Skip to content

Guides

Each guide covers one task end to end, with runnable code you can paste into a program or test. If you're new, read Core concepts first; it takes five minutes and makes everything here click.

  • Typed clients


    Anatomy of a generated package: dialing, inputs and outputs, optional fields, enums, unknown fields and escaping to raw calls.

  • Streaming with iterators


    iter.Seq2 for more calls: collecting, filtering, breaking early, timeouts and long-lived subscriptions.

  • File descriptors


    Send and receive *os.File over SCM_RIGHTS, ownership rules, limits and the mount-image walkthrough.

  • Errors


    Typed errors and sentinels, syscall.Errno from io.systemd.System, protocol errors, and falling back when a service is missing.

  • Versioning & feature detection


    Pinned vs latest packages, Supports, and handling API changes between systemd releases.

  • Concurrency & pools


    One call per connection, Pool, fan-out patterns, contexts and deadlines.

  • Raw calls & the core package


    json.RawMessage calls, CallReply, WithFiles, introspection and the IDL parser.

  • Serving Varlink


    Serve your own interfaces, or systemd's, with typed handlers, live and list streams, peer credentials and socket activation.

  • Testing with varlinktest


    Typed fake handlers, streaming fakes, fd fixtures, call assertions and record/replay against real systemd.

  • Migrating from go-systemd D-Bus


    Side-by-side code for common tasks, and when to keep D-Bus.

  • Security model


    Who authorizes calls, which limits protect you, and how fds and unknown data are handled.