The operations
Seventeen operations are everything an administrative caller can do. They enable and disable a plugin, grant and withdraw a capability, start, stop and restart a unit, start and stop a stream, set and clear a unit's log retention, ask a unit a question, read, query and follow the log, and subscribe. Each one ends in the Core, which acts on the caller's behalf: no caller ever reaches a unit directly. This page lists them, says what a change answers and when it takes effect, and shows how an operation about a unit reaches it.
Each operation takes one of four kinds of subject. Policy is per plugin, execution is per unit, and the rest is per instance. The set is initial: an addition is a member of the one union, so it appears on both projections at once.
The set
| Operation | Subject | Changes | Where the change lives |
|---|---|---|---|
plugin.enable, plugin.disable | plugin | whether it is enabled | the Registry, with a decision record beside it |
plugin.grant, plugin.withdraw | plugin and capability | a grant | the Registry, with a decision record beside it |
unit.start, unit.stop, unit.restart | unit | what is running | nowhere durable: this life of the instance |
unit.stream.start, unit.stream.stop | unit and stream | whether a stream is flowing | nowhere durable: a control instruction |
unit.retention.set, unit.retention.clear | unit | its group's retention override | the log store |
unit.ask | unit | nothing | nothing: an answer |
unit.command | unit and command type | whatever the unit does with the instruction | nothing in the Core: an acknowledgement, and a log entry |
read | a subject kind, and an identity where one is named | nothing | nothing |
log.query, log.follow | unit, incarnation, a time range, a severity floor | nothing | nothing |
subscribe | a filter on the event axes | nothing | nothing |
An incarnation qualifies rather than addresses: nothing is done to an incarnation, and log entries and past states are read by one.
What a change answers
| Field | Holds |
|---|---|
| previously | the value the operation replaced: the enablement, the grant, the state, the retention override |
| effective | immediately, or at the unit's next admission |
| consequences | one entry per unit affected: the unit, its incarnation, and what happened to it |
- An operation whose effect is already true succeeds and says nothing changed.
previouslycarries what the value was, so a caller knows whether it changed anything without reading first. - A decision and its consequences are reported separately, and the consequences are a list.
| Operation | effective | consequences |
|---|---|---|
plugin.disable | immediately | every incarnation of the plugin not yet ended concludes Refused — a live Session is revoked, a unit starting or admitted is concluded from the decision, a unit waiting to be relaunched is declined — and none is launched while the plugin stays disabled; one entry per unit |
plugin.enable | immediately | none: an enabled plugin runs when a unit of it is launched |
plugin.grant, plugin.withdraw | at the unit's next admission | each unit running that plugin, still under the scope computed at its own admission |
unit.start, unit.stop, unit.restart | immediately | the one unit named, with the incarnation ended and the one begun |
unit.stream.start, unit.stream.stop | immediately | the one unit named |
unit.retention.set, unit.retention.clear | immediately | none: the next cleaning cycle reads the override |
- A change of policy reaches a unit at its next admission, never mid-Session. To apply it now, change the policy and restart the unit — not the instance.
- Disabling is not stopping. It prevents future admission. A disabled plugin whose unit is still running is a coherent state, and the surface reports it.
- A decision is durable; an act against a running unit is not. A stopped unit stays stopped for this life of the instance and comes back at the next start unless something declared otherwise.
- No operation sets what the Core observed. Nothing marks a unit healthy, places it in a state or assigns it a Session, and no request field carries a state.
Every operation terminates in the Core
An administrative caller never opens a unit's socket, and nothing is forwarded to a unit as if the caller were the Core. An operation about a unit causes the Core to act.
| Operation | The Core | The caller observes |
|---|---|---|
unit.start, unit.stop, unit.restart | launches or ends a process | the answer, and the state changes as events |
unit.stream.start | creates the stream's transport, listens on it, then sends the activation as a control message on the unit's Session | the unit's acknowledgement, and unit.stream.activated |
unit.stream.stop | sends the instruction, then removes the transport | the acknowledgement, and unit.stream.stopped |
unit.ask | sends a query message on the unit's Session and correlates the answer | the opaque answer |
unit.command | sends the command as a control message on the unit's Session, emits unit.command.issued, and correlates the acknowledgement | the unit's first acknowledgement |
- A unit that is not answering cannot be reached by an operator either: nobody has a path around the state the Core reports.
- The Core waits 30 s for a unit's acknowledgement or answer. The figure is not declarable. An
elapsed wait is refused
unit.unanswered, and an answer arriving after it is discarded.
unit.ask
| What travels | an opaque question and an opaque answer, each at most 1 MiB |
| How | the query family of the unit's Session, correlated by the message identity the Core assigns there |
| What is recorded | a log entry naming the actor, the unit, the incarnation and that a question was asked — never the question or the answer |
| What is emitted | nothing |
The Core routes and correlates the question and never decodes it.
A stream's data never travels on this surface. That a stream was activated is an event; what the stream carries travels only on its own transport.
unit.command
| What it names | the unit, and a command type its Plugin declares |
| What travels | an opaque payload, at most 1 MiB; back, an acknowledgement and no payload |
| How | the control family of the unit's Session, as an interface client's command is carried |
| What the caller gets | the first acknowledgement: accepted, done or failed |
| What is recorded | a log entry naming the actor, the unit, the incarnation and the command type — never the payload |
| What is emitted | unit.command.issued, when the Core issues the message |
A type the Plugin does not declare is refused scope.undeclared and one its grants do not cover
scope.withheld; a refused command reaches nothing and emits nothing. A failed acknowledgement is an
answer, not a refusal.
A command given here is not arbitrated. This surface is not a channel, so no channel's holding suspends
or refuses it and it displaces none. The channel holding control keeps it, and learns of the command from
unit.command.issued.
Figures
| the wait for a unit's acknowledgement or answer | 30 s, not declarable |
| the bound on a question or an answer | 1 MiB each way |
| an answer after the wait | discarded |