Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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)
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