Documentation ¶
Index ¶
- Variables
- func ChoriaPlugin() plugin.Pluggable
- func New(mgr server.AgentManager) (agents.Agent, error)
- func SetRestartAction(f func(splay time.Duration, si agents.ServerInfoSource, log *logrus.Entry))
- func SetShutdownAction(f func(splay time.Duration, si agents.ServerInfoSource, log *logrus.Entry))
- type CSRReply
- type CSRRequest
- type ConfigureRequest
- type ED25519Reply
- type ED25519Request
- type JWTReply
- type JWTRequest
- type ReleaseUpdateRequest
- type Reply
- type ReprovisionRequest
- type RestartRequest
- type ShutdownRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // LockedError is the error that will be produced when another provisioning is busy provisioning this server LockedError = "Could not obtain provisioning lock" // LockWindow is how long provisioning locks will be held or extended for LockWindow = 2 * time.Minute )
Functions ¶
func ChoriaPlugin ¶
ChoriaPlugin creates the choria plugin hooks
func New ¶
func New(mgr server.AgentManager) (agents.Agent, error)
New creates a new instance of the agent
func SetRestartAction ¶
SetRestartAction sets a custom restart function to call than the default that causes a os.Exec() to be issued replacing the running instance with a new process on the old pid
func SetShutdownAction ¶ added in v0.26.2
SetShutdownAction sets a custom shutdown function to call than the default that causes a os.Exit(0) to be called
Types ¶
type CSRRequest ¶
type ConfigureRequest ¶
type ConfigureRequest struct { Token string `json:"token"` Configuration string `json:"config"` Key string `json:"key"` Certificate string `json:"certificate"` CA string `json:"ca"` SSLDir string `json:"ssldir"` ECDHPublic string `json:"ecdh_public"` ServerJWT string `json:"server_jwt"` ActionPolicies map[string]string `json:"action_policies"` OPAPolicies map[string]string `json:"opa_policies"` }
type ED25519Reply ¶ added in v0.25.0
type ED25519Request ¶ added in v0.25.0
type JWTRequest ¶
type JWTRequest struct {
Token string `json:"token"`
}
type ReleaseUpdateRequest ¶
type Reply ¶
type Reply struct {
Message string `json:"message"`
}
Reply is a generic reply used by most actions
type ReprovisionRequest ¶
type ReprovisionRequest struct {
Token string `json:"token"`
}
type RestartRequest ¶
type ShutdownRequest ¶ added in v0.26.2
type ShutdownRequest struct {
Token string `json:"token"`
}
Click to show internal directories.
Click to hide internal directories.