Documentation
¶
Index ¶
- type APIError
- type Client
- func (c *Client) Deploy(ctx context.Context, app string, req DeployRequest) (DeployResult, error)
- func (c *Client) Logs(ctx context.Context, app string, tail int) ([]LogLine, error)
- func (c *Client) Rollback(ctx context.Context, app string) (RollbackResult, error)
- func (c *Client) Scale(ctx context.Context, app string, replicas int32) (ScaleResult, error)
- func (c *Client) Status(ctx context.Context, app string) (StatusResult, error)
- type DeployRequest
- type DeployResult
- type LogLine
- type Release
- type RollbackResult
- type ScaleResult
- type StatusResult
- type WorkloadStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
APIError is a non-2xx response from the control plane, carrying its structured error (a machine-readable code and a human message) so a tool can surface both.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a thin HTTP client for the control-plane API (ADR-0005). The MCP server holds the API bearer token to authenticate to the control plane, but never any cluster credentials — those live only in the control plane. These DTOs mirror the API's JSON contract; the MCP layer (Apache-2.0) deliberately does not import the control-plane packages (FSL), so it stays a decoupled client across the license boundary (LICENSING.md).
func NewClient ¶
NewClient returns a control-plane API client for baseURL authenticating with token, using a default HTTP client.
func NewClientWithHTTP ¶
NewClientWithHTTP is like NewClient but uses the supplied *http.Client. The connect package uses this to route requests through the Kubernetes API-server proxy with a kubeconfig-authenticated transport (ADR-0014). A nil hc gets a default client.
func (*Client) Deploy ¶
func (c *Client) Deploy(ctx context.Context, app string, req DeployRequest) (DeployResult, error)
type DeployRequest ¶
type DeployResult ¶
type Release ¶
type Release struct {
ID string `json:"id"`
App string `json:"app"`
Image string `json:"image"`
Digest string `json:"digest,omitempty"`
Env map[string]string `json:"env,omitempty"`
Command []string `json:"command,omitempty"`
Replicas int32 `json:"replicas"`
Status string `json:"status"`
Supersedes string `json:"supersedes,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
type RollbackResult ¶
type ScaleResult ¶
type StatusResult ¶
type StatusResult struct {
App string `json:"app"`
HasRelease bool `json:"has_release"`
Release Release `json:"release,omitempty"`
Running bool `json:"running"`
Workload WorkloadStatus `json:"workload,omitempty"`
}