Skip to main content

Module controller

Module controller 

Source
Expand description

The reconciler behind isb serve: one worker thread per service keeps its replicas created, current, running, healthy and in the load balancer.

A worker never holds a lock across incus calls, and a slow service (an image pull, a long rollout) never delays another’s health checks. Workers are told about a new deployment through their shared slot and woken early; a worker whose service went away deletes its own instances and exits, so nothing ever has to join a worker from inside another.

Structs§

Controller
The daemon’s stack controller.
DeployChange
What a deploy is about to do, per service.
Event
Something that happened, for the event feed.
InstanceStatus
One replica, as stack_status reports it.
PortStatus
A published port: TCP served by the balancer, UDP by a NAT proxy on the replica (listen ends in /udp, backends is the replica).
RolloutStatus
A rollout in progress.
ServiceStatus
One service of a stack, as stack_status reports it.
SlotRollout
One slot’s handover: the instance going away and the one replacing it.
Snapshot
The latest host and instance sample.
StackStatus
A stack, as stack_status and stack_list report it.

Traits§

Observer
Something that follows which replicas receive traffic: the ingress. Called from worker threads, never with a controller lock held.

Functions§

now_ms
unsettled
Names of the services that are not converged, for a deploy waiting on its rollout.

Type Aliases§

EventSink
Hears every event as it is emitted. It must not block (the history queues and returns).