Documentation
¶
Index ¶
- Constants
- func ClusterBaseDirectory() string
- func ClusterExists(name string) (bool, error)
- func Exec(env *ExecEnvironment) error
- func ExecBao(env *ExecEnvironment) error
- func ExecVault(env *ExecEnvironment) error
- func ListClusters() ([]string, error)
- func ListNodes() ([]string, error)
- func ListProfiles() []string
- func NodeBaseDirectory() string
- func NodeExists(name string) (bool, error)
- func PrefixedAppend(slice []string, prefix string, values ...string) []string
- func ProfileDescription(name string) string
- func ProfilePKIMountRemove(client *api.Client) ([]string, error)
- func ProfilePKIMountSetup(client *api.Client) ([]string, error)
- func ProfileRemove(client *api.Client, profile string) ([]string, error)
- func ProfileSetup(client *api.Client, profile string) ([]string, error)
- func ProfileTransitSealMountRemove(client *api.Client) ([]string, error)
- func ProfileTransitSealMountSetup(client *api.Client) ([]string, error)
- func ProfileUserpassMountRemove(client *api.Client) ([]string, error)
- func ProfileUserpassMountSetup(client *api.Client) ([]string, error)
- type ArgBuilder
- type Audit
- type Cluster
- func (c *Cluster) Clean(force bool) error
- func (c *Cluster) FromInterface(iface map[string]interface{}) error
- func (c *Cluster) GetDirectory() string
- func (c *Cluster) GetLeader() (*Node, *api.Client, error)
- func (c *Cluster) JoinNodeHACluster(node *Node) error
- func (c *Cluster) LoadConfig() error
- func (c *Cluster) RemoveNodeHACluster(node *Node) error
- func (c *Cluster) SaveConfig() error
- func (c *Cluster) Validate() error
- type CommonAudit
- type ConfigBuilder
- type DevConfig
- type ExecEnvironment
- type FileAudit
- type FileStorage
- type InmemStorage
- type Listener
- type Node
- func (n *Node) Clean(force bool) error
- func (n *Node) FromInterface(iface map[string]interface{}) error
- func (n *Node) GetClient() (*api.Client, error)
- func (n *Node) GetConnectAddr() (string, string, error)
- func (n *Node) GetDirectory() string
- func (n *Node) GetEnv() (map[string]string, error)
- func (n *Node) Initialize() error
- func (n *Node) Kill() error
- func (n *Node) LoadConfig() error
- func (n *Node) PostInitializeUnseal() error
- func (n *Node) Resume() error
- func (n *Node) SaveConfig() error
- func (n *Node) SaveInstanceConfig(config string) (string, error)
- func (n *Node) SetAddress(addr string) (bool, error)
- func (n *Node) SetToken(token string) (bool, error)
- func (n *Node) Start() error
- func (n *Node) Unseal() (bool, error)
- func (n *Node) Validate() error
- func (n *Node) ValidateAddress() error
- func (n *Node) ValidateToken(token string) error
- type NodeConfig
- func (n *NodeConfig) AddArgs(directory string) ([]string, error)
- func (n *NodeConfig) FromInterface(iface map[string]interface{}) error
- func (n *NodeConfig) GetConnectAddr(directory string) (string, bool, string, error)
- func (n *NodeConfig) ToConfig(directory string) (string, error)
- func (n *NodeConfig) Validate() error
- type NodeConfigOpt
- type PostUnsealHook
- type RaftStorage
- type Seal
- type Storage
- type TCPListener
- type TLSConfig
- type TransitSeal
- type UnixListener
- type Unmarshable
Constants ¶
View Source
const ( TLS_CA_NAME = "ca.pem" TLS_CERTS_NAME = "fullchain.pem" TLS_KEY_NAME = "leaf-key.pem" )
View Source
const ( SERVICE_LOG_NAME = "service.log" EXEC_JSON_NAME = "exec.json" )
View Source
const ( NodeJsonName = "node.json" InstanceConfigName = "config.hcl" )
View Source
const ( PKIProfile string = "pki" TransitProfile string = "transit" UserpassProfile string = "userpass" )
View Source
const (
ClusterJsonName = "cluster.json"
)
View Source
const (
HAClusterType string = "HA"
)
Variables ¶
This section is empty.
Functions ¶
func ClusterBaseDirectory ¶
func ClusterBaseDirectory() string
func ClusterExists ¶
func Exec ¶
func Exec(env *ExecEnvironment) error
func ExecBao ¶
func ExecBao(env *ExecEnvironment) error
func ExecVault ¶
func ExecVault(env *ExecEnvironment) error
func ListClusters ¶
func ListProfiles ¶
func ListProfiles() []string
func NodeBaseDirectory ¶
func NodeBaseDirectory() string
func NodeExists ¶
func ProfileDescription ¶
func ProfilePKIMountRemove ¶
func ProfilePKIMountSetup ¶
func ProfileRemove ¶
func ProfileSetup ¶
Types ¶
type ArgBuilder ¶
type Audit ¶
type Audit interface { ConfigBuilder PostUnsealHook }
type Cluster ¶
type Cluster struct { Name string `json:"name"` Type string `json:"type"` Nodes []string `json:"nodes"` }
func LoadCluster ¶
func LoadClusterUnvalidated ¶
func (*Cluster) FromInterface ¶
func (*Cluster) GetDirectory ¶
func (*Cluster) JoinNodeHACluster ¶
func (*Cluster) LoadConfig ¶
func (*Cluster) RemoveNodeHACluster ¶
func (*Cluster) SaveConfig ¶
type CommonAudit ¶
type CommonAudit struct { ConfigBuilder ElideListResponses bool `json:"elide_list_responses"` Format string `json:"format"` HmacAccessor bool `json:"hmac_accessor"` LogRaw bool `json:"log_raw"` Prefix string `json:"prefix"` }
func (*CommonAudit) FromInterface ¶
func (c *CommonAudit) FromInterface(iface map[string]interface{}) error
type ConfigBuilder ¶
type ConfigBuilder interface { Unmarshable ToConfig(directory string) (string, error) }
type DevConfig ¶
type DevConfig struct { Token string `json:"token,omitempty"` Address string `json:"address,omitempty"` Tls bool `json:"tls,omitempty"` }
func (*DevConfig) FromInterface ¶
type ExecEnvironment ¶
type ExecEnvironment struct { Binary string `json:"binary"` Args []string `json:"args"` Directory string `json:"directory"` ConnectAddress string `json:"connection_address"` Pid int `json:"pid"` }
func (*ExecEnvironment) Kill ¶
func (e *ExecEnvironment) Kill() error
func (*ExecEnvironment) ReadLogs ¶
func (e *ExecEnvironment) ReadLogs() (string, error)
func (*ExecEnvironment) SaveConfig ¶
func (e *ExecEnvironment) SaveConfig(pid int) error
func (*ExecEnvironment) ValidateRunning ¶
func (e *ExecEnvironment) ValidateRunning() error
func (*ExecEnvironment) WaitAlive ¶
func (e *ExecEnvironment) WaitAlive(logPath string) error
type FileAudit ¶
type FileAudit struct { CommonAudit FilePath string `json:"file_path"` Mode string `json:"mode"` }
func (*FileAudit) FromInterface ¶
func (*FileAudit) PostUnseal ¶
type FileStorage ¶
type FileStorage struct{}
func (*FileStorage) FromInterface ¶
func (f *FileStorage) FromInterface(iface map[string]interface{}) error
func (*FileStorage) StorageType ¶
func (f *FileStorage) StorageType() string
type InmemStorage ¶
type InmemStorage struct{}
func (*InmemStorage) FromInterface ¶
func (i *InmemStorage) FromInterface(iface map[string]interface{}) error
func (*InmemStorage) StorageType ¶
func (i *InmemStorage) StorageType() string
type Listener ¶
type Listener interface { ConfigBuilder GetConnectAddr(string) (string, string, error) }
type Node ¶
type Node struct { Name string `json:"name"` Type string `json:"type"` Exec *ExecEnvironment `json:"exec"` Config NodeConfig `json:"config"` Addr string `json:"addr"` Ca string `json:"ca"` Token string `json:"token"` UnsealKeys []string `json:"unseal_keys,omitempty"` Cluster string `json:"cluster,omitempty"` NonVoter bool `json:"non_voter"` }
func LoadNodeUnvalidated ¶
func (*Node) FromInterface ¶
func (*Node) GetDirectory ¶
func (*Node) Initialize ¶
func (*Node) LoadConfig ¶
func (*Node) PostInitializeUnseal ¶
func (*Node) SaveConfig ¶
func (*Node) ValidateAddress ¶
func (*Node) ValidateToken ¶
type NodeConfig ¶
type NodeConfig struct { Dev *DevConfig `json:"dev,omitempty"` ListenerTypes []string `json:"listener_types,omitempty"` Listeners []Listener `json:"listeners,omitempty"` StorageType string `json:"storage_type,omitempty"` Storage Storage `json:"storage,omitempty"` SealTypes []string `json:"seal_types,omitempty"` Seals []Seal `json:"seals,omitempty"` AuditTypes []string `json:"audit_types,omitempty"` Audits []Audit `json:"audits,omitempty"` }
func (*NodeConfig) FromInterface ¶
func (n *NodeConfig) FromInterface(iface map[string]interface{}) error
func (*NodeConfig) GetConnectAddr ¶
func (*NodeConfig) Validate ¶
func (n *NodeConfig) Validate() error
type NodeConfigOpt ¶
type NodeConfigOpt interface{}
type PostUnsealHook ¶
type RaftStorage ¶
type RaftStorage struct{}
func (*RaftStorage) FromInterface ¶
func (r *RaftStorage) FromInterface(iface map[string]interface{}) error
func (*RaftStorage) StorageType ¶
func (r *RaftStorage) StorageType() string
type Seal ¶
type Seal interface { ConfigBuilder UnsealHelper(client *api.Client) error }
type Storage ¶
type Storage interface { ConfigBuilder StorageType() string }
type TCPListener ¶
func (*TCPListener) FromInterface ¶
func (t *TCPListener) FromInterface(iface map[string]interface{}) error
func (*TCPListener) GetConnectAddr ¶
func (t *TCPListener) GetConnectAddr(directory string) (string, string, error)
type TransitSeal ¶
type TransitSeal struct { Address string `json:"address"` Token string `json:"token"` MountPath string `json:"mount_path"` KeyName string `json:"key_name"` Disabled bool `json:"disabled"` }
func (*TransitSeal) FromInterface ¶
func (t *TransitSeal) FromInterface(iface map[string]interface{}) error
func (*TransitSeal) UnsealHelper ¶
func (t *TransitSeal) UnsealHelper(client *api.Client) error
type UnixListener ¶
type UnixListener struct {
Path string `json:"path"`
}
func (*UnixListener) FromInterface ¶
func (u *UnixListener) FromInterface(iface map[string]interface{}) error
func (*UnixListener) GetConnectAddr ¶
func (u *UnixListener) GetConnectAddr(directory string) (string, string, error)
type Unmarshable ¶
Click to show internal directories.
Click to hide internal directories.