provision

package
v0.28.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2024 License: Apache-2.0 Imports: 31 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChoriaPlugin

func ChoriaPlugin() plugin.Pluggable

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

func SetRestartAction(f func(splay time.Duration, si agents.ServerInfoSource, log *logrus.Entry))

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

func SetShutdownAction(f func(splay time.Duration, si agents.ServerInfoSource, log *logrus.Entry))

SetShutdownAction sets a custom shutdown function to call than the default that causes a os.Exit(0) to be called

Types

type CSRReply

type CSRReply struct {
	CSR       string `json:"csr"`
	PublicKey string `json:"public_key"`
	SSLDir    string `json:"ssldir"`
}

type CSRRequest

type CSRRequest struct {
	Token string `json:"token"`
	CN    string `json:"cn"`
	C     string `json:"C"`
	L     string `json:"L"`
	O     string `json:"O"`
	OU    string `json:"OU"`
	ST    string `json:"ST"`
}

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 ED25519Reply struct {
	PublicKey string `json:"public_key"`
	Directory string `json:"directory"`
	Signature string `json:"signature"`
}

type ED25519Request added in v0.25.0

type ED25519Request struct {
	Token string `json:"token"`
	Nonce string `json:"nonce"`
}

type JWTReply

type JWTReply struct {
	JWT        string `json:"jwt"`
	ECDHPublic string `json:"ecdh_public"`
}

type JWTRequest

type JWTRequest struct {
	Token string `json:"token"`
}

type ReleaseUpdateRequest

type ReleaseUpdateRequest struct {
	Token      string `json:"token"`
	Repository string `json:"repository"`
	Version    string `json:"version"`
}

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 RestartRequest struct {
	Token string `json:"token"`
	Splay int    `json:"splay"`
}

type ShutdownRequest added in v0.26.2

type ShutdownRequest struct {
	Token string `json:"token"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL