Documentation
¶
Index ¶
- Constants
- type ArtifactHash
- type ArtifactHashesRequest
- type ArtifactHashesResponse
- type Client
- func (c *Client) Call(ctx context.Context, method string, params any, out any) error
- func (c *Client) Events(ctx context.Context, req EventsRequest, onEvent func(Event)) error
- func (c *Client) Exec(ctx context.Context, req ExecRequest, stdin io.Reader, stdout io.Writer, ...) (int, error)
- func (c *Client) ServiceInfo(ctx context.Context, service string) (ServiceInfoResponse, error)
- type Error
- type Event
- type EventsRequest
- type ExecMessage
- type ExecRequest
- type ProgressMode
- type Request
- type Resize
- type Response
- type ServiceComponentStatus
- type ServiceIP
- type ServiceImage
- type ServiceImageRef
- type ServiceInfo
- type ServiceInfoRequest
- type ServiceInfoResponse
- type ServiceMacvlan
- type ServiceNetwork
- type ServicePaths
- type ServiceStatus
- type ServiceTailscale
- type TailscaleSetupRequest
- type TailscaleSetupResponse
Constants ¶
View Source
const ( ErrParseError = -32700 ErrInvalidRequest = -32600 ErrMethodNotFound = -32601 ErrInvalidParams = -32602 ErrInternal = -32603 )
View Source
const ( ExecMsgResize = "resize" ExecMsgStdinClose = "stdin-close" ExecMsgExit = "exit" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactHash ¶
type ArtifactHashesRequest ¶
type ArtifactHashesRequest struct {
Service string `json:"service"`
}
type ArtifactHashesResponse ¶
type ArtifactHashesResponse struct {
Found bool `json:"found"`
Message string `json:"message,omitempty"`
Payload *ArtifactHash `json:"payload,omitempty"`
Env *ArtifactHash `json:"env,omitempty"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ServiceInfo ¶
type EventsRequest ¶
type ExecMessage ¶
type ExecRequest ¶
type ExecRequest struct {
Service string `json:"service"`
Host string `json:"host,omitempty"`
User string `json:"user,omitempty"`
Args []string `json:"args"`
PayloadName string `json:"payloadName,omitempty"`
TTY bool `json:"tty"`
Progress ProgressMode `json:"progress,omitempty"`
Term string `json:"term,omitempty"`
Rows int `json:"rows,omitempty"`
Cols int `json:"cols,omitempty"`
}
type ProgressMode ¶
type ProgressMode string
const ( ProgressAuto ProgressMode = "auto" ProgressTTY ProgressMode = "tty" ProgressPlain ProgressMode = "plain" ProgressQuiet ProgressMode = "quiet" )
type Request ¶
type Request struct {
JSONRPC string `json:"jsonrpc"`
ID json.RawMessage `json:"id,omitempty"`
Method string `json:"method"`
Params json.RawMessage `json:"params,omitempty"`
}
type Response ¶
type Response struct {
JSONRPC string `json:"jsonrpc"`
ID json.RawMessage `json:"id,omitempty"`
Result any `json:"result,omitempty"`
Error *Error `json:"error,omitempty"`
}
type ServiceComponentStatus ¶
type ServiceImage ¶
type ServiceImage struct {
Repo string `json:"repo"`
Refs map[string]ServiceImageRef `json:"refs,omitempty"`
}
type ServiceImageRef ¶
type ServiceInfo ¶
type ServiceInfo struct {
Name string `json:"name"`
ServiceType string `json:"serviceType,omitempty"`
DataType string `json:"dataType,omitempty"`
Generation int `json:"generation,omitempty"`
LatestGeneration int `json:"latestGeneration,omitempty"`
Staged bool `json:"staged,omitempty"`
Paths ServicePaths `json:"paths,omitempty"`
Network ServiceNetwork `json:"network,omitempty"`
Status ServiceStatus `json:"status,omitempty"`
Images []ServiceImage `json:"images,omitempty"`
}
type ServiceInfoRequest ¶
type ServiceInfoRequest struct {
Service string `json:"service"`
}
type ServiceInfoResponse ¶
type ServiceInfoResponse struct {
Found bool `json:"found"`
Message string `json:"message,omitempty"`
Info ServiceInfo `json:"info,omitempty"`
}
type ServiceMacvlan ¶
type ServiceNetwork ¶
type ServiceNetwork struct {
SvcIP string `json:"svcIp,omitempty"`
IPs []ServiceIP `json:"ips,omitempty"`
IPError string `json:"ipError,omitempty"`
Macvlan *ServiceMacvlan `json:"macvlan,omitempty"`
Tailscale *ServiceTailscale `json:"tailscale,omitempty"`
}
type ServicePaths ¶
type ServicePaths struct {
Root string `json:"root,omitempty"`
}
type ServiceStatus ¶
type ServiceStatus struct {
Components []ServiceComponentStatus `json:"components,omitempty"`
Error string `json:"error,omitempty"`
}
type ServiceTailscale ¶
type TailscaleSetupRequest ¶
type TailscaleSetupRequest struct {
ClientSecret string `json:"clientSecret"`
}
type TailscaleSetupResponse ¶
Click to show internal directories.
Click to hide internal directories.