Documentation
¶
Overview ¶
Package cli provides a Unix-domain-socket-based command server that enables `jumpgate logs`, `jumpgate status`, and other CLI subcommands to communicate with the running JumpGate daemon without adding any web dashboard or REST API overhead.
Index ¶
Constants ¶
const ( ActionLogs = "logs" ActionStatus = "status" ActionEnv = "env" ActionRollback = "rollback" )
Action constants for CLI commands sent over the Unix socket.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
// Action is one of "logs", "status", "env", or "rollback".
Action string `json:"action"`
// AppName is the JumpGate application name to query.
AppName string `json:"app_name"`
// DeploymentID is an optional specific deployment to query (for logs).
DeploymentID string `json:"deployment_id,omitempty"`
}
Command is a JSON-encoded request sent from the CLI client to the daemon over the Unix socket.
type Response ¶
type Response struct {
Success bool `json:"success"`
Data any `json:"data,omitempty"`
Error string `json:"error,omitempty"`
}
Response is a JSON-encoded reply from the daemon to the CLI client.
type SocketServer ¶
type SocketServer struct {
// contains filtered or unexported fields
}
SocketServer listens on a Unix domain socket for CLI commands and dispatches them to registered handlers.
func NewSocketServer ¶
NewSocketServer creates a SocketServer that listens on the given Unix socket path and dispatches commands using the provided Store. The pipeline reference is used by the rollback handler to trigger re-deployments.