Documentation ¶
Index ¶
- Constants
- func GenerateClientCert(caFile, caKey string) (caCert, clientCertPEM, clientKeyPEM []byte, err error)
- func GenerateServerCert(caFile, caKey string) (caCert, serverCertPEM, serverKeyPEM []byte, err error)
- func GetAgentInstanceCerts(caFile, caKey string) (string, string, error)
- func GetOrInitDefaultCaCerts() (string, string, error)
- type AgentConfig
- type ConfigDeleteRequest
- type ConfigFile
- type ConfigGroup
- type ConfigList
- type ConfigRepo
- type ConfigSyncRequest
- type ConfigSyncResponse
- type ConfigUpdateRequest
- type InstanceGroup
- type InstanceSettings
- type KeystoreValue
- type ResourceGroup
- type Secrets
- type SetupConfig
Constants ¶
View Source
const REGISTER_API = "/instance/_register"
View Source
const SYNC_API = "/configs/_sync"
Variables ¶
This section is empty.
Functions ¶
func GenerateClientCert ¶
func GenerateServerCert ¶
func GetAgentInstanceCerts ¶
func GetOrInitDefaultCaCerts ¶
Types ¶
type AgentConfig ¶
type AgentConfig struct { Enabled bool `config:"enabled"` Setup *SetupConfig `config:"setup"` }
func GetAgentConfig ¶
func GetAgentConfig() *AgentConfig
type ConfigDeleteRequest ¶
type ConfigDeleteRequest struct {
Configs []string `json:"configs"`
}
type ConfigFile ¶
type ConfigFile struct { Name string `json:"name,omitempty"` Location string `json:"location,omitempty"` Content string `json:"content,omitempty"` Updated int64 `json:"updated,omitempty"` Version int64 `json:"version,omitempty"` Size int64 `json:"size,omitempty"` Readonly bool `json:"readonly,omitempty"` Managed bool `json:"managed"` Hash string `json:"hash,omitempty"` }
type ConfigGroup ¶
type ConfigGroup struct {
Files []string `config:"files"`
}
type ConfigList ¶
type ConfigList struct { Main ConfigFile `json:"main,omitempty"` Configs map[string]ConfigFile `json:"configs,omitempty"` }
type ConfigRepo ¶
type ConfigRepo struct { ConfigGroups map[string]ConfigGroup `config:"configs"` InstanceGroups map[string]InstanceGroup `config:"instances"` SecretGroups map[string]Secrets `config:"secrets"` }
type ConfigSyncRequest ¶
type ConfigSyncRequest struct { ForceSync bool `json:"force_sync"` //ignore hash check in server Hash string `json:"hash"` Client model.Instance `json:"client"` Configs ConfigList `json:"configs"` }
type ConfigSyncResponse ¶
type ConfigSyncResponse struct { Changed bool `json:"changed"` Configs struct { CreatedConfigs map[string]ConfigFile `json:"created,omitempty"` DeletedConfigs map[string]ConfigFile `json:"deleted,omitempty"` UpdatedConfigs map[string]ConfigFile `json:"updated,omitempty"` } `json:"configs,omitempty"` Secrets *Secrets `json:"secrets,omitempty"` }
type ConfigUpdateRequest ¶
type InstanceGroup ¶
type InstanceSettings ¶
type KeystoreValue ¶
type ResourceGroup ¶
type Secrets ¶
type Secrets struct {
Keystore map[string]KeystoreValue `json:"keystore,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.