controlplane

package
v0.12.10 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdAgents

func NewCmdAgents(f *cmdutil.Factory, runF func(context.Context, *AgentsOptions) error) *cobra.Command

NewCmdAgents creates the `clawker controlplane agents` command.

func NewCmdControlPlane

func NewCmdControlPlane(f *cmdutil.Factory) *cobra.Command

NewCmdControlPlane creates the parent command for control plane break-glass management. Day-to-day callers do not need these verbs: the CP is brought up automatically during agent container start and by `clawker firewall up`. These commands exist for explicit lifecycle control during debugging and recovery.

func NewCmdDown

func NewCmdDown(f *cmdutil.Factory, runF func(context.Context, *DownOptions) error) *cobra.Command

NewCmdDown creates the controlplane down command. Stops and removes the CP container; the CP's own SIGTERM handler drains the firewall stack (Envoy + CoreDNS containers and per-container eBPF state) before exiting, so this verb leaves no orphans behind.

func NewCmdStatus

func NewCmdStatus(f *cmdutil.Factory, runF func(context.Context, *StatusOptions) error) *cobra.Command

NewCmdStatus creates the controlplane status command. Tolerates an absent CP without bootstrapping — when IsRunning returns false the run function short-circuits before touching f.AdminClient (which would attempt a dial to a stopped CP and fail fast).

func NewCmdUp

func NewCmdUp(f *cmdutil.Factory, runF func(context.Context, *UpOptions) error) *cobra.Command

NewCmdUp creates the controlplane up command. Wraps Manager.EnsureRunning — idempotent — and, when firewall.enable (settings.yaml) is true, brings the firewall stack up via the same idempotent FirewallInit the `firewall up` verb sends. A freshly booted CP starts the stack itself as a pre-ready startup gate (boot fails if bringup fails); the CLI-side call covers the idempotent path (CP already running, stack down — e.g. after `firewall down`).

Types

type AgentsOptions

type AgentsOptions struct {
	IOStreams   *iostreams.IOStreams
	TUI         *tui.TUI
	Logger      func() (*logger.Logger, error)
	AdminClient func(context.Context) (adminv1.AdminServiceClient, error)
	Format      *cmdutil.FormatFlags
}

AgentsOptions wires the command's run function. The agents read path goes through the AdminService gRPC surface — CP is the SOLE writer of the agent registry, so the host can no longer read sqlite directly. `f.AdminClient(ctx).ListAgents` is the canonical access.

type DownOptions

type DownOptions struct {
	IOStreams    *iostreams.IOStreams
	ControlPlane func() manager.Manager
}

type StatusOptions

type StatusOptions struct {
	IOStreams    *iostreams.IOStreams
	ControlPlane func() manager.Manager
	AdminClient  func(context.Context) (adminv1.AdminServiceClient, error)
	Format       *cmdutil.FormatFlags
}

type UpOptions

type UpOptions struct {
	IOStreams    *iostreams.IOStreams
	Config       func() (config.Config, error)
	Client       func(context.Context) (*docker.Client, error)
	ControlPlane func() manager.Manager
	AdminClient  func(context.Context) (adminv1.AdminServiceClient, error)
}

Jump to

Keyboard shortcuts

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