Documentation
¶
Overview ¶
Package controlapply is the consume side of the control-plane contract: a background controller that polls a feed.Source for control events and applies them to the local databases so a fleet stays in sync.
Model (internal docs/todo-architecture-saas-fleet.md §3.1): an event is a notification + a content-addressed artifact ref + checksum. The applier fetches the artifact, verifies it, and upserts the affected local rows in one transaction, advancing the control-version cursor. It is inert unless a feed source is configured (--feed-source != nop) so single-node behaviour is unchanged.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is the background applier. Lifecycle mirrors the continuation sweeper (Start/Stop, ticker, ctx.Done, errors logged not fatal).
func NewController ¶
func (*Controller) PollOnceForTest ¶
func (c *Controller) PollOnceForTest(ctx context.Context)
PollOnceForTest exposes the internal poll-and-apply loop for integration tests that drive the applier synchronously instead of relying on the ticker. Not part of the public API.
func (*Controller) Start ¶
func (c *Controller) Start()
func (*Controller) Stop ¶
func (c *Controller) Stop()
type RowsArtifact ¶
type RowsArtifact = controlevent.RowsArtifact
type StackActivatedArtifact ¶
type StackActivatedArtifact = controlevent.StackActivatedArtifact
type StackArtifactFile ¶
type StackArtifactFile = controlevent.StackArtifactFile