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: `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 ¶
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).
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.