Documentation
¶
Overview ¶
Package suite is the client for suite runner protocol v1 (KyQuickStart docs/superpowers/specs/2026-10-16-suite-runner-design.md, "Runner protocol v1"): HTTP/1.1 over the runner's Unix socket, JSON both ways, unknown fields refused.
Index ¶
- Constants
- Variables
- func CheckSocketPath(socket string) error
- type App
- type Catalog
- type CatalogApp
- type Client
- func (c *Client) Catalog(ctx context.Context) (*Catalog, error)
- func (c *Client) Operation(ctx context.Context, id string) (*Operation, error)
- func (c *Client) Plan(ctx context.Context) (*Plan, error)
- func (c *Client) Start(ctx context.Context, r Request) error
- func (c *Client) Status(ctx context.Context) (*Status, error)
- type Error
- type Health
- type Operation
- type Plan
- type Request
- type Result
- type Runner
- type Status
- type Step
- type Target
- type Upgrade
Constants ¶
View Source
const (
// MaxRequestBytes is the protocol's request cap.
MaxRequestBytes = 64 << 10
)
Variables ¶
View Source
var ( // ErrUnreachable is a failed exchange: the runner may or may not have seen the request. ErrUnreachable = errors.New("suite runner unreachable") // ErrInvalidResponse is an answer outside the protocol. ErrInvalidResponse = errors.New("suite runner answered outside protocol v1") // ErrNotFound is a 404: the runner does not know the operation. ErrNotFound = errors.New("suite runner does not know the operation") // ErrUnsafeSocket is a socket directory another user could control. ErrUnsafeSocket = errors.New("suite runner socket directory is not private") )
View Source
var ( Kinds = []string{"install", "uninstall", "unmanage", "upgrade"} States = []string{"running", "succeeded", "failed", "unknown"} )
Kinds and States are the protocol's closed vocabularies.
Functions ¶
func CheckSocketPath ¶
CheckSocketPath refuses a path that could bind outside the directory checked at dial time.
Types ¶
type Catalog ¶
type Catalog struct {
ReleaseSet string `json:"release_set"`
Apps []CatalogApp `json:"apps"`
}
type CatalogApp ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type Error ¶
type Error struct {
Status int `json:"-"`
Code string `json:"code"`
Message string `json:"message"`
}
Error is the runner's refusal, or a failed operation's cause.
type Request ¶
type Request struct {
ID string `json:"id"`
Kind string `json:"kind"`
Apps []string `json:"apps"`
Target string `json:"target,omitempty"`
AcknowledgeNoBackup bool `json:"acknowledge_no_backup"`
Actor string `json:"actor"`
}
Request starts an operation. Target is sent only for install; Apps is always a list.
Click to show internal directories.
Click to hide internal directories.