enum ControlPlane
Swift
enum ControlPlane
Where the renderer publishes its object reference, and the client reads it.
A file rather than a nameserver: this is one machine, and requiring a
separate npnameserver process to start before the compositor would be a
deployment step in exchange for nothing. The IOR string already carries the
endpoint.
One file per session, though, not one per machine. Two compositors on one
XDG_RUNTIME_DIR is the ordinary case while developing one — a nested
session started from a terminal inside the live one — and a single
well-known name makes them fight over it: the second to start owns the
file, every client launched afterwards follows it regardless of which
session it belongs to, and the live session is left pointing at a deleted
path when the nested one ends.
Sources/LavaClient/ControlPlane.swift:40
Properties
static var referencePath: String { get }
The reference this process should read, in order of how explicit the answer is: told outright, inherited from a session, or — for a client started outside one — the single compositor running, if there is exactly one.
Sources/LavaClient/ControlPlane.swift:56
static var sessionName: String? { get }
Which session this process belongs to, by the name of the Wayland socket it inherited. Nil outside a session — a plain tty, an ssh shell, a test harness run by hand.
Sources/LavaClient/ControlPlane.swift:44
Methods
static func published() -> [String]
Every session currently advertising a compositor, as full paths. Sorted, so an error message reads the same twice in a row.
A reference whose Wayland socket is gone is left out. The compositor unlinks its own on the way out, including on a signal, but a session that was killed outright leaves one behind — and the socket it is named after is the cheapest thing that says so.
Sources/LavaClient/ControlPlane.swift:86