Documentation ¶
Index ¶
Constants ¶
View Source
const ConsulAddr = "consul-addr"
View Source
const ConsulTLSSkipVerify = "consul-tls-skip-verify"
View Source
const ListenPort = "listen-port"
View Source
const NomadAddr = "nomad-addr"
View Source
const NomadTLSSkipVerify = "nomad-tls-skip-verify"
View Source
const VaultAddr = "vault-addr"
View Source
const VaultTLSSkipVerify = "vault-tls-skip-verify"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppRoleConfig ¶
type AuthConfig ¶
type ConsulConfig ¶
type Jobs ¶
type Jobs interface { Register(*api.Job, *api.WriteOptions) (*api.JobRegisterResponse, *api.WriteMeta, error) Info(jobID string, q *api.QueryOptions) (*api.Job, *api.QueryMeta, error) List(q *api.QueryOptions) ([]*api.JobListStub, *api.QueryMeta, error) Deregister(jobID string, purge bool, q *api.WriteOptions) (string, *api.WriteMeta, error) Allocations(jobID string, allAllocs bool, q *api.QueryOptions) ([]*api.AllocationListStub, *api.QueryMeta, error) }
type NomadConfig ¶
type NomadConfig struct { Address string ACLToken string `hcl:"acl_token"` TLS TLSConfig Region string Namespace string Driver string Datacenter string Scheduling SchedulingDefaults }
func NewNomadConfig ¶
func NewNomadConfig() *NomadConfig
func (*NomadConfig) MakeClient ¶
func (nc *NomadConfig) MakeClient() (Jobs, error)
type ProviderConfig ¶
type ProviderConfig struct { LogLevel string `hcl:"log_level"` ListenPort int `hcl:"listen_port"` HealthEnabled bool `hcl:"health_enabled"` Auth AuthConfig DNSServers bool `hcl:"dns_servers"` Nomad NomadConfig Consul ConsulConfig Vault VaultConfig FunctionPrefix string ReadTimeout time.Duration `hcl:"read_timeout"` WriteTimeout time.Duration `hcl:"write_timeout"` }
func NewProviderConfig ¶
func NewProviderConfig() *ProviderConfig
func (*ProviderConfig) Default ¶
func (pc *ProviderConfig) Default() *ProviderConfig
func (*ProviderConfig) LoadCommandLine ¶
func (pc *ProviderConfig) LoadCommandLine(args map[string]interface{}) *ProviderConfig
func (*ProviderConfig) LoadFile ¶
func (pc *ProviderConfig) LoadFile(configFile string) (*ProviderConfig, error)
type SchedulingDefaults ¶
type SchedulingDefaults struct { JobType string `hcl:"job_type"` JobPrefix string `hcl:"job_prefix"` Count int Memory int CPU int RestartAttempts int `hcl:"restart_attempts"` RestartMode string `hcl:"restart_mode"` RestartDelay string `hcl:"restart_delay"` Priority int DiskSize int NetworkingMode string `hcl:"network_mode"` }
type SecretConfig ¶
type VaultConfig ¶
type VaultConfig struct { Client *api.Client Address string TLS TLSConfig AppRole AppRoleConfig Secrets SecretConfig }
func NewVaultConfig ¶
func NewVaultConfig() *VaultConfig
func (*VaultConfig) MakeClient ¶
func (vc *VaultConfig) MakeClient() (*api.Client, error)
Click to show internal directories.
Click to hide internal directories.