Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultRefreshInterval = 7 * 24 * time.Hour
Default refresh cadence. Cloudbox's CertLifetime is 30 days; we refresh weekly so an offline stretch can't expire the cert.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
CloudboxBase string
AccessToken string
Principal string // assigned_hostname / agent_name
HostKey ssh.Signer
// Refresh interval. Zero = DefaultRefreshInterval.
RefreshInterval time.Duration
// OnRefresh is called when a fresh cert lands. Typically wired
// to write the new cert + ca pubkey into FileConfig.Cluster
// and SaveFile.
OnRefresh func(cert, caPubkey string) error
// HTTPClient is optional; default 30s timeout.
HTTPClient *http.Client
}
Config is what NewManager takes.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is the long-running cert refresh worker.
func NewManager ¶
Click to show internal directories.
Click to hide internal directories.