Documentation
¶
Overview ¶
Package cluster implements the DevOps reference workload's deterministic tools as a webhook-backed tool endpoint behind the Fenced Tool Gateway:
kubernetes.get@1.0.0 inspect a service's pod health kubernetes.logs@1.0.0 recent log lines for a service kubernetes.restart@1.0.0 restart a service's pods (heals the incident) kubernetes.scale@1.0.0 scale a service's replicas server.exec@1.0.0 run a shell command on the target host
The fake cluster carries one in-memory service ("checkout") that starts in an unhealthy state; restart heals it unless the scenario marks the cluster as stubborn (restart fails to heal), which exercises the rollback path.
Index ¶
- func SelfSignedTLSListener(handler http.Handler) (net.Listener, *http.Client, string, error)
- type Cluster
- func (c *Cluster) Exec(command string) (string, error)
- func (c *Cluster) Get(service string) (State, error)
- func (c *Cluster) Logs(service string, lines int) ([]string, error)
- func (c *Cluster) Restart(service string) (State, error)
- func (c *Cluster) Scale(service string, replicas int) (State, error)
- func (c *Cluster) Snapshot() State
- type Server
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cluster ¶
type Cluster struct {
// Stubborn makes restart fail to heal, forcing the rollback path.
Stubborn bool
// contains filtered or unexported fields
}
Cluster is the deterministic in-memory target of the DevOps tools.
func (*Cluster) Restart ¶
Restart implements kubernetes.restart. It heals the service unless the cluster is stubborn (the rollback acceptance uses this).
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves the tool contract over HTTP(S).
type State ¶
type State struct {
Service string `json:"service"`
Healthy bool `json:"healthy"`
Replicas int `json:"replicas"`
ReadyReplicas int `json:"readyReplicas"`
RestartCount int `json:"restartCount"`
Reason string `json:"reason,omitempty"`
ExecCalls int `json:"execCalls"`
}
State is one snapshot of the fake cluster service.