Documentation
¶
Index ¶
- Constants
- func ACMEDNSEndpoint(project, environment string) string
- func AccessLogsEndpoint(tail int, follow bool) string
- func ActualStateEndpoint(project string, environment string) string
- func BackupsEndpoint(project string, environment string, volume string, backupID string) string
- func CertificatesEndpoint(domain string) string
- func DiscoveryExportsEndpoint(environment string) string
- func EnvBundleEndpoint(project string, environment string) string
- func ExecEndpoint() string
- func ImageBuildEndpoint(image string, dockerfile ...string) string
- func ImageBuildEndpointWithAuth(image string, dockerfile ...string) string
- func ImageBuildEndpointWithOptions(image string, dockerfile string, withAuth bool) string
- func ImageExistsEndpoint(image string) string
- func JobsApplyEndpoint() string
- func LeaseEndpoint(project string, environment string) string
- func LogsEndpoint(project string, environment string, service string, tail int, follow bool) string
- func MetricsEndpoint(collect bool) string
- func ParseACMEDNSError(server string, err error) error
- func ProxyFileEndpoint(name string) string
- func RequestJSON(client RequestExecutor, socket string, method string, endpoint string, ...) (string, error)
- func RequestJSONWithContext(ctx context.Context, client RequestExecutor, socket string, method string, ...) (string, error)
- func RequestJSONWithTimeout(client RequestExecutor, socket string, method string, endpoint string, ...) (string, error)
- func RequestJSONWithTimeoutContext(ctx context.Context, client RequestExecutor, socket string, method string, ...) (string, error)
- func RequireCapability(ctx context.Context, client RequestExecutor, socket string, server string, ...) error
- func StateEndpoint(project string, environment string, document string) string
- func StateNodeEndpoint(project string, environment string, document string, node string) string
- func StateRevisionEndpoint(project string, environment string, document string, revisionID string) string
- func StatsEndpoint(project string, environment string, service string, all bool) string
- func StreamOutput(client StreamExecutor, socket string, endpoint string, stdout io.Writer, ...) error
- func StreamOutputWithContext(ctx context.Context, client StreamExecutor, socket string, endpoint string, ...) error
- func StreamRequest(client RequestExecutor, socket string, method string, endpoint string, ...) (string, error)
- func StreamRequestOutputWithContext(ctx context.Context, client StreamExecutor, socket string, method string, ...) error
- func StreamRequestWithContext(ctx context.Context, client RequestExecutor, socket string, method string, ...) (string, error)
- type ACMECompletedCertificate
- type ACMECompletedOperation
- type ACMEOperationError
- type CapabilityRequiredError
- type HTTPError
- type RequestExecutor
- type StreamExecutor
- type UnixSocketDialer
- type UpgradedStream
Constants ¶
const ( JSONRequestTimeout = 2 * time.Minute StreamRequestTimeout = 30 * time.Minute )
const ACMEDNSRequestTimeout = 5 * time.Minute
const DefaultSocket = "/run/tako/takod.sock"
Variables ¶
This section is empty.
Functions ¶
func ACMEDNSEndpoint ¶ added in v0.9.3
func AccessLogsEndpoint ¶
func ActualStateEndpoint ¶
func BackupsEndpoint ¶
func CertificatesEndpoint ¶ added in v0.9.2
func DiscoveryExportsEndpoint ¶ added in v0.4.35
func EnvBundleEndpoint ¶
func ExecEndpoint ¶ added in v0.8.0
func ExecEndpoint() string
func ImageBuildEndpoint ¶
func ImageBuildEndpointWithAuth ¶ added in v0.8.0
ImageBuildEndpointWithAuth marks the build request body as carrying a registry-auth JSON preamble line ahead of the tar stream. The flag is the only auth-related value in the URL; credentials ride the body.
func ImageBuildEndpointWithOptions ¶
ImageBuildEndpointWithOptions marks the body as carrying a JSON options preamble before the build-context archive. Build arg values stay out of URLs.
func ImageExistsEndpoint ¶ added in v0.5.4
func JobsApplyEndpoint ¶ added in v0.8.0
func JobsApplyEndpoint() string
ExecEndpoint returns the takod exec endpoint path.
func LeaseEndpoint ¶
func LogsEndpoint ¶
func MetricsEndpoint ¶
func ParseACMEDNSError ¶ added in v0.9.3
ParseACMEDNSError converts a structured takod error response into a stable typed error. Non-ACME and malformed responses retain their original type.
func ProxyFileEndpoint ¶
func RequestJSON ¶
func RequestJSONWithContext ¶ added in v0.7.0
func RequestJSONWithTimeout ¶ added in v0.4.1
func RequestJSONWithTimeoutContext ¶ added in v0.7.0
func RequireCapability ¶ added in v0.9.2
func RequireCapability(ctx context.Context, client RequestExecutor, socket string, server string, required string, feature string) error
RequireCapability reads /v1/status and fails closed before a caller sends a payload or invokes an endpoint an older node would silently ignore.
func StateNodeEndpoint ¶
func StateRevisionEndpoint ¶
func StatsEndpoint ¶
func StreamOutput ¶
func StreamOutputWithContext ¶ added in v0.7.0
func StreamRequest ¶
func StreamRequestOutputWithContext ¶ added in v0.8.0
func StreamRequestOutputWithContext(ctx context.Context, client StreamExecutor, socket string, method string, endpoint string, body io.Reader, stdout io.Writer, stderr io.Writer) error
StreamRequestOutputWithContext sends a request body and streams the chunked response live to stdout/stderr (no buffering, no status marker) — the POST counterpart of StreamOutputWithContext. Clients without stdin streaming get the body embedded base64-encoded in the remote command.
Types ¶
type ACMECompletedCertificate ¶ added in v0.9.3
type ACMECompletedOperation ¶ added in v0.9.3
type ACMECompletedOperation struct {
Domain string `json:"domain"`
Action string `json:"action"`
Certificate ACMECompletedCertificate `json:"certificate"`
}
type ACMEOperationError ¶ added in v0.9.3
type ACMEOperationError struct {
Server string
Code string
Domain string
RetryAfter time.Time
Completed []ACMECompletedOperation
Err error
}
ACMEOperationError preserves takod's issuance classification so a control plane can distinguish local cooldown and CA rate-limit responses from other deployment failures.
func (*ACMEOperationError) Error ¶ added in v0.9.3
func (e *ACMEOperationError) Error() string
func (*ACMEOperationError) Unwrap ¶ added in v0.9.3
func (e *ACMEOperationError) Unwrap() error
type CapabilityRequiredError ¶ added in v0.9.2
CapabilityRequiredError rejects an operation before mutation when a target node agent does not advertise a capability required by the request.
func (*CapabilityRequiredError) Error ¶ added in v0.9.2
func (e *CapabilityRequiredError) Error() string
type HTTPError ¶ added in v0.9.2
HTTPError preserves a non-success takod response status so command adapters can map rejected input to their typed machine error taxonomy.
type RequestExecutor ¶
type StreamExecutor ¶
type UnixSocketDialer ¶ added in v0.8.1
type UnixSocketDialer interface {
DialUnixSocket(ctx context.Context, path string) (net.Conn, error)
}
UnixSocketDialer opens a full-duplex connection to a Unix socket on the takod node, typically through an SSH direct-streamlocal channel.
type UpgradedStream ¶ added in v0.8.1
UpgradedStream is a hijacked takod connection speaking the ptystream frame protocol. Reader buffers bytes that arrived with the handshake response; always read frames from Reader, never from Conn directly.
func UpgradeStream ¶ added in v0.8.1
func UpgradeStream(ctx context.Context, dialer UnixSocketDialer, socket string, endpoint string, value any) (*UpgradedStream, error)
UpgradeStream dials the takod socket, POSTs value to endpoint with an Upgrade: tako-pty/1 handshake, and returns the connection as a raw frame stream once the server switches protocols. A non-101 response is returned as an error carrying the response body.
func (*UpgradedStream) Close ¶ added in v0.8.1
func (s *UpgradedStream) Close() error
Close closes the underlying connection.