controlplane

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 11 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: `f.AdminClient` transparently invokes `cpboot.EnsureRunning` on first use, so the first `clawker firewall status` (or any other admin RPC) auto-boots the CP. 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 trigger EnsureRunning via its lazy closure).

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.

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() cpboot.Manager
}

type StatusOptions

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

type UpOptions

type UpOptions struct {
	IOStreams    *iostreams.IOStreams
	ControlPlane func() cpboot.Manager
}

Jump to

Keyboard shortcuts

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