Documentation
¶
Overview ¶
Package apiclient is the public Go client for the Zattera API. The CLI is built on it; third parties may use it directly. It wraps a single gRPC connection with bearer-token auth and typed service accessors.
Leader forwarding: any control node accepts unary mutating calls and transparently forwards them to the current raft leader (T-08), so a client may target any node for these. Streaming RPCs are NOT forwarded — they are served from the contacted node's local (eventually-consistent) state, or, for leader-only streams, fail with codes.FailedPrecondition carrying the leader address so the caller can redial it. Point streaming calls at the leader when strong consistency matters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Auth zatterav1.AuthServiceClient
Projects zatterav1.ProjectServiceClient
Apps zatterav1.AppServiceClient
Deploys zatterav1.DeployServiceClient
Nodes zatterav1.NodeServiceClient
Logs zatterav1.LogServiceClient
Metrics zatterav1.MetricsServiceClient
Domains zatterav1.DomainServiceClient
Volumes zatterav1.VolumeServiceClient
Jobs zatterav1.JobServiceClient
Exec zatterav1.ExecServiceClient
State zatterav1.StateServiceClient
Alerts zatterav1.AlertServiceClient
Audit zatterav1.AuditServiceClient
Backup zatterav1.BackupServiceClient
// contains filtered or unexported fields
}
Client is a connected API client.
type Config ¶
type Config struct {
// Address like "paas.example.com:8443" (scheme optional, https implied).
Address string
Token string
// CACertPEM pins the cluster CA. Empty = system roots.
CACertPEM []byte
// InsecureSkipVerify is for `--dev` servers with self-signed certs whose
// CA the CLI has not stored (discouraged; prefer CACertPEM).
InsecureSkipVerify bool
}
Config for a client connection.