cli

package
v0.1.0-proto2g Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: MPL-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd, _ = gapicli.NewControlRoot(
	"goblin", "goblinctl", version.Version, "Goblin distributed supervisor control")

RootCmd is goblinctl's root, built by the kernel's shared constructor so the control roots of all four binaries carry one definition of each flag's name, shorthand, default and help text (cli-contract.md).

It also supplies the identity surface: `version`, `--version` and `-v` all render core/version.Summary(), and the block names the binary rather than printing cobra's anonymous one-liner (GOBLIN-DIV-052). The leading "goblin" is the product this process belongs to, and the control binary must agree with its daemon about it: goblinctl resolves the same environment namespace and the same config search path that goblind writes (GOBLIN-DIV-055).

Functions

This section is empty.

Types

type ClusterController

type ClusterController struct {
	// contains filtered or unexported fields
}

ClusterController implements tui.AgentControl for Goblin cluster using Serf RPC

func NewClusterController

func NewClusterController(addr string) *ClusterController

func (*ClusterController) FetchStatus

func (c *ClusterController) FetchStatus(ctx context.Context) (_ []tui.AgentStatus, err error)

func (*ClusterController) GetLogs

func (c *ClusterController) GetLogs(ctx context.Context, id string) (<-chan string, error)

func (*ClusterController) Lifecycle

func (c *ClusterController) Lifecycle(ctx context.Context, id, action string) (bool, error)

type GoblindStartFlags

type GoblindStartFlags struct {
	// Cluster membership and control plane.
	ListenAddr      string
	AdvertiseAddr   string
	JoinAddr        string
	BootstrapExpect int
	EncryptionKey   string

	// Raft and storage.
	RaftDir               string
	RaftSnapshotInterval  time.Duration
	RaftSnapshotThreshold uint64
	RaftTrailingLogs      uint64

	// Security.
	AgentVerifyKey   string
	ProductionMode   bool
	OperatorKeyFiles []string

	// Boot and lifecycle.
	Pid1Mode           bool
	NoEarlyMounts      bool
	NetworkGateTimeout time.Duration
	ShutdownGrace      time.Duration
	WatchdogDevice     string
	WatchdogInterval   time.Duration
}

GoblindStartFlags are local to `goblind start`. They configure a run rather than describing the process, which is what keeps them off the persistent set (cli-contract.md).

The split is 9 persistent to 18 local. GOBLIN-DIV-053 states 25 flags splitting 9 to 16; the root actually carried 27. Counted rather than copied, because an entry that names a count rots.

func NewGoblindRoot

func NewGoblindRoot(start func(*cobra.Command, []string) error) (*cobra.Command, *gapicli.DaemonFlags, *GoblindStartFlags)

NewGoblindRoot builds goblind's root and its `start` subcommand.

start is a parameter so this package never imports internal/supervisor - the same constraint the kernel's pkg/cli holds, and what makes the root constructible by a test that must not boot a node.

type QUICRPCClient

type QUICRPCClient struct {
	// contains filtered or unexported fields
}

QUICRPCClient is a client for making RPC calls over QUIC

func NewQUICRPCClient

func NewQUICRPCClient(addr string, tlsConfig transport.TLSConfig) (*QUICRPCClient, error)

NewQUICRPCClient creates a new QUIC RPC client

func (*QUICRPCClient) Call

func (c *QUICRPCClient) Call(method string, req, resp proto.Message) error

Call sends a protobuf request and decodes a protobuf response.

func (*QUICRPCClient) Close

func (c *QUICRPCClient) Close() error

Close closes the QUIC connection

type UnifiedController

type UnifiedController struct {
	// contains filtered or unexported fields
}

UnifiedController provides a unified view of cluster and local state

func NewUnifiedController

func NewUnifiedController(rpcAddr, gapiAddr string) *UnifiedController

NewUnifiedController creates a new unified controller

func (*UnifiedController) FetchStatus

func (u *UnifiedController) FetchStatus(ctx context.Context) (_ []tui.AgentStatus, err error)

FetchStatus returns combined status from cluster members, jobs, and local agents

func (*UnifiedController) GetLogs

func (u *UnifiedController) GetLogs(ctx context.Context, id string) (<-chan string, error)

GetLogs streams logs from agents or cluster

func (*UnifiedController) Lifecycle

func (u *UnifiedController) Lifecycle(ctx context.Context, id, action string) (bool, error)

Lifecycle handles lifecycle operations for local agents

Jump to

Keyboard shortcuts

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