Changelog¶
All notable changes to this project are documented here. The format follows
Keep a Changelog, and the project
uses semantic versioning for the core, varlinktest,
idl and the generator. Generated packages under systemd/v<N> only gain
new release directories; see API changes
for what changed in systemd itself.
Unreleased¶
Added¶
varlink.Server: serve Varlink interfaces from Go.- Typed handlers (
Handle,HandleStream) checked against the IDL at registration, and parameters validated against it per call, as sd-varlink does. - Live and list streams (
LastIsFinal),AllowSingle,AllowUnknownFields,oneway, pipelined calls answered in order, and file descriptors in both directions. - Built-in
org.varlink.serviceintrospection, standard errors, and handler errors mapped toio.systemd.System. - Peer credentials (
Call.Peer),ListenandListenActivated(systemd socket activation byFileDescriptorName=), and graceful shutdown. - Connection, frame, fd and idle limits.
- Examples
queued(a complete service) andmetrics-provider(servesio.systemd.Metricswith the generated types). - Bindings for systemd v262 under
systemd/v262/: 46 interfaces, 13 of them new (CryptEnroll,InstanceMetadata,Job,MachineInstance,Report,Report.Signer,Report.Uploader,Shutdown,StorageProvider,SysInstall,SysUpdate,SysUpdate.Notify,VirtualMachineInstance), and new methods such asUnit.StartTransient,Login.ListSessions,Hostname.SetHostnameandManager.Reboot. See API changes for everything systemd changed.
Changed¶
systemd/latestnow re-exports v262 (was v260). systemd v262 turned many plain fields into enums or made them optional, so code using these throughlatestmay no longer compile:unit: most ofExecContext,UnitContextandCGroupContext(for exampleExecContext.NoNewPrivilegesis now*boolandExecContext.ProtectSystemis now*ProtectSystem), andWorkingDirectory.Path.manager:ManagerContext.LogTarget,DefaultOOMPolicy,DefaultStandardOutput,DefaultStandardError,DefaultMemoryPressureWatchandCtrlAltDelBurstActionare enums.machine:KillIn.Whomis*KillWhom;ListOut.ClassandRegisterIn.ClassareMachineClass.managedoomandoom:ControlGroup.ModeisManagedOOMMode.bootcontrol:BootEntryAddon.Optionsis*string.repart:ListCandidateDevicesOut.Nodeis*string.
Enums are string types, so untyped string constants still compile. To
keep the old types, import systemd/v260/... instead of latest.
- Conn.Stream, and with it every generated ...More method and
StreamAs, no longer yields a final reply that has no parameters and no
file descriptors. sd-varlink services send one to end an empty stream
(logind's ListSessions with no sessions, for example), and
HandleStream sends one when a live stream ends; both used to show up as
one zero-valued item. An empty list now yields nothing.
Fixed¶
- The frame size limit now also applies to complete messages that arrive in a single read, on both the client and server side.
0.1.0¶
Added¶
varlink: Varlink client core —Dial,DialService,NewConn,Conn.Call,CallReply,Stream(asiter.Seq2),Oneway;Pool;StreamAs; context deadlines and cancellation.- File-descriptor passing in both directions with
SCM_RIGHTS, via*os.Filefields taggedvarlink:"name,fd". Unclaimed descriptors are closed; received descriptors are close-on-exec. - Errors:
*varlink.Errormatched by name witherrors.Is,*varlink.SystemErrorunwrapping tosyscall.Errno, sentinels fororg.varlink.serviceerrors,ErrUnsupportedfor missing services. - Introspection:
GetInfo,GetInterfaceDescription,Supports. idl: parser for the Varlink IDL including systemd's streaming annotations.sdvarlink-gen: generates typed packages, the interface reference and release-to-release API reports.- Generated bindings for every
io.systemd.*interface in systemd v257, v258 and v260, plussystemd/latest. varlinktest: fake server with typed (Handle,On,OnStream) and raw handlers, introspection, call recording, and record/replay golden files.- IDL extraction from systemd sources (
hack/extract-idl.sh) and capture from a running system (hack/capture-idl.sh). - 15 runnable examples and a documentation site.
- GoReleaser releases of
sdvarlink-genfor Linux, macOS and FreeBSD, with a snapshot build on every branch push.
Releases and their notes are on GitHub Releases. For what changed in systemd's Varlink API between releases, see API changes.