Documentation
¶
Index ¶
- func NewCmdAgents(f *cmdutil.Factory, runF func(context.Context, *AgentsOptions) error) *cobra.Command
- func NewCmdControlPlane(f *cmdutil.Factory) *cobra.Command
- func NewCmdDown(f *cmdutil.Factory, runF func(context.Context, *DownOptions) error) *cobra.Command
- func NewCmdStatus(f *cmdutil.Factory, runF func(context.Context, *StatusOptions) error) *cobra.Command
- func NewCmdUp(f *cmdutil.Factory, runF func(context.Context, *UpOptions) error) *cobra.Command
- type AgentsOptions
- type DownOptions
- type StatusOptions
- type UpOptions
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 ¶
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 ¶
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 ¶
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.