Documentation ¶
Index ¶
- Constants
- func NomaWriteDefaults(ctx context.Context) *nomad.WriteOptions
- func NomadQueryDefaults(ctx context.Context) *nomad.QueryOptions
- type NomadStorage
- func (NomadStorage) CaddyModule() caddy.ModuleInfo
- func (ns *NomadStorage) CertMagicStorage() (certmagic.Storage, error)
- func (ns NomadStorage) Delete(ctx context.Context, key string) error
- func (ns NomadStorage) Exists(ctx context.Context, key string) bool
- func (ns NomadStorage) List(ctx context.Context, prefix string, recursive bool) ([]string, error)
- func (ns NomadStorage) Load(ctx context.Context, key string) ([]byte, error)
- func (ns NomadStorage) Lock(ctx context.Context, key string) error
- func (ns *NomadStorage) Provision(ctx caddy.Context) error
- func (ns NomadStorage) Stat(ctx context.Context, key string) (certmagic.KeyInfo, error)
- func (ns NomadStorage) Store(ctx context.Context, key string, value []byte) error
- func (ns NomadStorage) Unlock(ctx context.Context, key string) error
- func (ns *NomadStorage) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
- type StorageData
Constants ¶
View Source
const ( // DefaultPrefix defines the default prefix in variable store DefaultPrefix = "caddytls" // DefaultValuePrefix sets a prefix to variables to check validation DefaultValuePrefix = "caddy-storage-nomad" // DefaultTimeout is the default timeout for Nomad connections DefaultTimeout = 10 // EnvNamePrefix defines the env variable name to override Var key prefix EnvNamePrefix = "CADDY_CLUSTERING_NOMAD_PREFIX" // EnvValuePrefix defines the env variable name to override Var value prefix EnvValuePrefix = "CADDY_CLUSTERING_NOMAD_VALUEPREFIX" )
Variables ¶
This section is empty.
Functions ¶
func NomaWriteDefaults ¶
func NomaWriteDefaults(ctx context.Context) *nomad.WriteOptions
func NomadQueryDefaults ¶
func NomadQueryDefaults(ctx context.Context) *nomad.QueryOptions
Types ¶
type NomadStorage ¶
type NomadStorage struct { certmagic.Storage NomadClient *nomad.Client Address string `json:"address"` Token string `json:"token"` Timeout int `json:"timeout"` Prefix string `json:"prefix"` ValuePrefix string `json:"value_prefix"` TlsEnabled bool `json:"tls_enabled"` TlsInsecure bool `json:"tls_insecure"` // contains filtered or unexported fields }
NomadStorage allows to store certificates and other TLS resources in a shared cluster environment using Nomad Variables.
func (NomadStorage) CaddyModule ¶
func (NomadStorage) CaddyModule() caddy.ModuleInfo
func (*NomadStorage) CertMagicStorage ¶
func (ns *NomadStorage) CertMagicStorage() (certmagic.Storage, error)
func (NomadStorage) Delete ¶
func (ns NomadStorage) Delete(ctx context.Context, key string) error
Delete a key from Nomad KV
func (NomadStorage) Exists ¶
func (ns NomadStorage) Exists(ctx context.Context, key string) bool
Exists checks if a key exists
func (NomadStorage) Lock ¶ added in v0.0.2
func (ns NomadStorage) Lock(ctx context.Context, key string) error
func (*NomadStorage) Provision ¶
func (ns *NomadStorage) Provision(ctx caddy.Context) error
Provision is called by Caddy to prepare the module
func (NomadStorage) Unlock ¶ added in v0.0.2
func (ns NomadStorage) Unlock(ctx context.Context, key string) error
func (*NomadStorage) UnmarshalCaddyfile ¶
func (ns *NomadStorage) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
type StorageData ¶
StorageData describes the data that is saved in a Secure Variable
Click to show internal directories.
Click to hide internal directories.