Versions in this module Expand all Collapse all v0 v0.19.0 Nov 7, 2026 v0.18.0 Nov 5, 2026 v0.17.2 Nov 2, 2026 v0.17.1 Nov 1, 2026 v0.17.0 Oct 29, 2026 Changes in this version + const AuthorityCertFile + const AuthorityPath + const ConvertAction + const DefaultAuthorityPath + const DefaultClusterDir + const DefaultClusterPort + const DefaultJoinCheckTimeout + const DefaultTokenLifetime + const HostCertFile + const HostClientCertFile + const HostClientKeyFile + const HostKeyFile + const HostNextKeyFile + const InvalidField + const JoinKeyFile + const JoinPath + const JoinedFile + const ListenerCommonName + const MaxTokenLifetime + const MaxTokenUses + const PeersFile + const PeersPath + const RenewPath + const RevokedFile + func CheckAgentAddress(address string) error + func CheckAppRoleJoin(runtimeKind string, roles []string) error + func CheckHostName(name string) error + func CheckJoinRequest(req JoinRequest) error + func ControlHostCert(dir string, a *Authority, name string, roles []string, now time.Time) (tls.Certificate, string, error) + func ControlRoleNeedsEveryVerb(roles []string) bool + func Encode(address, authorityHash string, tokenSecret secret.Value) string + func InstallHost(h state.Host) bool + func InstallHostName(hostname string) string + func JoinedTLS(authorityPEM []byte, cert tls.Certificate) (*tls.Config, error) + func ListenerAddress(address string) (string, error) + func NormalizeRoles(roles []string) ([]string, error) + func PingAddress(address string, port int) string + func PinnedTLS(hash string) *tls.Config + func RecordInstallHost(ctx context.Context, store InstallHostStore, info InstallHostInfo) (state.Host, bool, error) + func RenewingControlHostCert(dir string, a *Authority, name string, roles []string, now func() time.Time) (*hostagent.RenewingCert, error) + func WritePeers(path string, list []Peer) error + type AdapterStore interface + List func(ctx context.Context) ([]state.AdapterConfig, error) + Save func(ctx context.Context, c state.AdapterConfig) (state.Replaced, error) + type AuditWriter interface + Write func(ctx context.Context, e audit.Event) error + type Authority struct + Cert *x509.Certificate + Key crypto.Signer + func LoadOrCreateAuthority(path string) (*Authority, error) + func (a *Authority) Authorities() hostagent.Authorities + func (a *Authority) CertPEM() []byte + func (a *Authority) Hash() string + func (a *Authority) IssueHost(csrPEM []byte, name string, roles []string, now time.Time) (certPEM []byte, sha string, err error) + func (a *Authority) IssueHostClient(hostID string, now time.Time) (certPEM []byte, keyPEM secret.Value, err error) + func (a *Authority) ListenerTLS(names []string, now time.Time) (*tls.Config, error) + func (a *Authority) PEM() ([]byte, error) + type BackupDestinations interface + Backup func(ref string) (api.BackupAdapter, bool) + Default func(c api.Category) (string, bool) + type ControlKeys struct + Authority secret.Value + DatabaseURL secret.Value + SecretsKey secret.Value + SecretsKeyPath string + TokenKey secret.Value + type ControlPeers struct + Logger *zap.Logger + Pin string + PinOf func() string + Port int + Self string + Store HostPublisher + func (c *ControlPeers) Peers(ctx context.Context) ([]Peer, error) + type CredentialStore interface + Put func(ctx context.Context, adapterID, field string, v secret.Value) error + type Decoded struct + Address string + AuthorityHash string + Secret secret.Value + func Decode(token string) (Decoded, error) + type EveryVerbChecker interface + CheckHoldsEveryInstallVerb func(ctx context.Context, p authz.Principal, act, because string) error + type HostCerts struct + Host *hostagent.RenewingCert + Probe *hostagent.RenewingCert + type HostLister interface + Hosts func(ctx context.Context) ([]state.Host, error) + type HostPublisher interface + Revoked func(ctx context.Context) (state.Revoked, error) + RotateHostCert func(ctx context.Context, hostID, next string) error + SetHostPing func(ctx context.Context, hostID, address, certSHA256 string) error + type HostRenewal struct + Address string + AuthorityPEM []byte + Dir string + HTTP func(*tls.Config) *http.Client + Name string + Now func() time.Time + func (r *HostRenewal) Certs(host, probe tls.Certificate) *HostCerts + func (r *HostRenewal) Renew(ctx context.Context, current tls.Certificate) (host, probe tls.Certificate, err error) + type InstallHostInfo struct + Address string + Hostname string + Platform string + Version string + type InstallHostStore interface + RecordFirstHost func(ctx context.Context, h state.Host) (state.Host, bool, error) + type JoinFiles struct + AuthorityPath string + DatabaseURLPath string + Dir string + TokenKeyPath string + func (f JoinFiles) Read() (Joined, bool, error) + type JoinReadiness interface + ReadyToJoin func(ctx context.Context, roles []string) error + type JoinRequest struct + Address string + CSR []byte + Name string + Platform string + Secret secret.Value + Version string + func (req JoinRequest) AuditDetail() map[string]any + type JoinResult struct + Authority []byte + Certificate []byte + Host state.Host + HostClientCert []byte + HostClientKey secret.Value + Keys *ControlKeys + NetworkPool string + func (r JoinResult) Wire() WireJoinResult + type Joined struct + Cluster string + HostID string + JoinedAt time.Time + Name string + NetworkPool string + Roles []string + func (j Joined) AppOnly() bool + type Joiner struct + AgentAddress string + DefaultName string + Files JoinFiles + Fresh func(ctx context.Context) (accounts, apps bool, err error) + HTTP func(*tls.Config) *http.Client + Now func() time.Time + Platform string + Restart func() + SetupToken func(ctx context.Context, token secret.Value) error + Version string + func (j *Joiner) Join(ctx context.Context, token, name string) (Joined, error) + func (j *Joiner) Setup(ctx context.Context, token, name string) (Joined, error) + func (j *Joiner) SetupWithToken(ctx context.Context, setupToken secret.Value, token, name string) (Joined, error) + type KeySource struct + DatabaseURL secret.Value + SecretsKeyPath func(context.Context) string + TokenKeyPath string + type Members struct + func (m *Members) Admits(hostID, certSHA256 string) bool + func (m *Members) Has(hostID string) bool + func (m *Members) KeepRevoked(path string, r state.Revoked) error + func (m *Members) LoadRevoked(path string) + func (m *Members) Revoke(r state.Revoked) bool + func (m *Members) Revoked() state.Revoked + func (m *Members) Track(peers func(context.Context) ([]Peer, error)) func(context.Context) ([]Peer, error) + type MintRequest struct + Address string + ExpiresIn time.Duration + MaxUses int + Roles []string + type Minted struct + Join secret.Value + Token state.JoinToken + type Peer struct + Address string + Control bool + ID string + Lost bool + Name string + func LivenessPeers(list []state.Host) []Peer + func ReadPeers(path string) ([]Peer, error) + type PeerList struct + Hosts []Peer + Revoked state.Revoked + type PeerSync struct + Address string + File string + HTTP *http.Client + Members *Members + TLS *tls.Config + func (p *PeerSync) Peers(ctx context.Context) ([]Peer, error) + type PolicyLoader interface + Load func(ctx context.Context) (policy.Document, error) + type Readiness struct + Routing RoutingAdapters + func NewReadiness(backups BackupDestinations, policy PolicyLoader, ...) *Readiness + func (r *Readiness) ReadyToJoin(ctx context.Context, roles []string) error + type Removed struct + Host state.Host + Notice string + Rotate []string + type RenewResult struct + Certificate []byte + Host state.Host + HostClientCert []byte + HostClientKey secret.Value + func (r RenewResult) Wire() WireRenewResult + type RestartSignal interface + RequestRestart func(ctx context.Context) error + type RoutingAdapters interface + ByCategory func(c api.Category) []string + Routing func(ref string) (api.RoutingAdapter, bool) + type Runtime struct + Adapters AdapterStore + Audit AuditWriter + Authority *Authority + Credentials CredentialStore + Declared func(id string) bool + Hosts HostLister + Joined bool + LocalAgentAddress string + LocalName string + Restart RestartSignal + func (r *Runtime) CheckJoin(ctx context.Context, name string, roles []string) error + func (r *Runtime) NetworkPool(ctx context.Context) string + func (r *Runtime) Sync(ctx context.Context) (SyncResult, error) + type RuntimeHost struct + AgentAddress string + CertSHA256 string + Control bool + Endpoint string + Name string + TotalCPUMillis int + TotalDiskBytes int64 + TotalMemoryBytes int64 + func RuntimeHosts(hosts []state.Host) ([]RuntimeHost, error) + type Service struct + Address string + Authority *Authority + IsSelf func(state.Host) bool + JoinCheckTimeout time.Duration + Keys KeySource + Now func() time.Time + OnChange func(ctx context.Context) + Readiness JoinReadiness + Runtime *Runtime + Store Store + Version string + func (s *Service) CertRevoked(ctx context.Context, certDER []byte) (bool, error) + func (s *Service) Changed(ctx context.Context) + func (s *Service) ControlCount(ctx context.Context) (int, error) + func (s *Service) Count(ctx context.Context) (int, error) + func (s *Service) DefaultRoles(ctx context.Context) ([]string, error) + func (s *Service) Hosts(ctx context.Context) ([]state.Host, error) + func (s *Service) Join(ctx context.Context, req JoinRequest) (JoinResult, error) + func (s *Service) Mint(ctx context.Context, az EveryVerbChecker, p authz.Principal, req MintRequest) (Minted, error) + func (s *Service) PeerList(ctx context.Context, certDER []byte) (PeerList, error) + func (s *Service) Peers(ctx context.Context, certDER []byte) ([]Peer, error) + func (s *Service) Remove(ctx context.Context, hostID string) (Removed, error) + func (s *Service) Renew(ctx context.Context, certDER, csrPEM []byte) (RenewResult, error) + func (s *Service) Revoke(ctx context.Context, tokenID string) (state.JoinToken, error) + func (s *Service) ThisHost(list []state.Host) string + func (s *Service) Tokens(ctx context.Context) ([]state.JoinToken, error) + type Store interface + CertRevoked func(ctx context.Context, sha string) (bool, error) + CheckJoinToken func(ctx context.Context, presented secret.Value) (state.JoinToken, error) + ConfirmHostCert func(ctx context.Context, hostID, current string) (bool, error) + ConfirmJoin func(ctx context.Context, hostID string) (bool, error) + CreateJoinToken func(ctx context.Context, roles []string, maxUses int, createdBy string, ...) (state.IssuedJoinToken, error) + HostByCert func(ctx context.Context, sha string) (state.Host, bool, error) + Hosts func(ctx context.Context) ([]state.Host, error) + Join func(ctx context.Context, presented secret.Value, h state.Host) (state.JoinToken, state.Host, error) + JoinTokens func(ctx context.Context) ([]state.JoinToken, error) + RemoveHost func(ctx context.Context, hostID string) (state.Host, error) + RenewHostCert func(ctx context.Context, hostID, presented, next string, nextPEM []byte) (state.Host, bool, error) + RevokeJoinToken func(ctx context.Context, tokenID string) (state.JoinToken, error) + Revoked func(ctx context.Context) (state.Revoked, error) + type SyncResult struct + AdapterID string + Changed bool + Converted bool + type WireJoinRequest struct + Address string + CSR string + Name string + Platform string + Secret string + Version string + func (w WireJoinRequest) Request() JoinRequest + type WireJoinResult struct + Authority string + Certificate string + Host state.Host + HostClientCert string + HostClientKey string + Keys *WireKeys + NetworkPool string + type WireKeys struct + ClusterAuthority string + DatabaseURL string + SecretsKey string + SecretsKeyPath string + TokenKey string + type WireRenewRequest struct + CSR string + type WireRenewResult struct + Certificate string + Host state.Host + HostClientCert string + HostClientKey string