Introspect a service¶
Source ยท Depends on the socket
varlinkctl info plus varlinkctl introspect, using only the core
varlink package and the idl parser: no generated bindings. Point it at any
Varlink socket, systemd's or your own.
Run it¶
Output (real, systemd-journald v255)
systemd (systemd-journald) 255 (255.4-1ubuntu8.17) (The systemd Project)
io.systemd (0 methods, 0 types, 4 errors)
io.systemd.Journal (4 methods, 0 types, 1 errors)
Synchronize() -> ()
Rotate() -> ()
FlushToVar() -> ()
RelinquishVar() -> ()
org.varlink.service (2 methods, 0 types, 6 errors)
GetInfo() -> (vendor: string, product: string, version: string, url: string, interfaces: []string)
GetInterfaceDescription(interface: string) -> (description: string)
The code¶
How it works¶
varlink.GetInfocallsorg.varlink.service.GetInfo: vendor, product, version and the interface list.varlink.GetInterfaceDescriptionreturns each interface's IDL text.idl.Parseturns it into an*idl.Interface.idl.Typevalues print themselves in IDL syntax, andMethod.Morereports streaming annotations.- Both helpers take a
varlink.Caller, so they work with aConn, aPool, or a generated client'sCaller().