controlapply

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2026 License: MPL-2.0 Imports: 19 Imported by: 0

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 NewController(ctx context.Context, pu *processor.Unit,
	adminCtrl *admin.Controller, src feed.Source, astore artifact.Store) *Controller

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL