Documentation ¶
Overview ¶
Package vault is a source implementation that retrieves cache data from a path in a Hashicorp Vault key/value store.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSource ¶ added in v1.1.0
CreateSource returns a vault source with a client associated to work with
func CreateVaultClient ¶
CreateVaultClient returns a Vault Client with a valid Token provided by the Vault Agent assigned to it.
`fpath` indicates the path of the file to read from. This file is where the token provided by the agent is stored.
Types ¶
type Option ¶
type Option func(*Source)
Option represents a function which will make some change to the source during initialization.
func Client ¶
Client is an option function which will set the source's client to the one that is provided.
type Source ¶ added in v1.1.0
type Source struct {
// contains filtered or unexported fields
}
Source contains the Vault API client and complete path to the cache data within the vault.
func NewSource ¶
NewSource creates a new Vault source using the options provided. If no options are provided a client is initialized with the default values.
func (*Source) Client ¶ added in v1.1.0
Client is a convenience function to retrieve the Vault API client from the source.
func (*Source) FillGroupCache ¶ added in v1.1.0
FillGroupCache reads entries from the Vault and uses them to fill the group cache.
func (*Source) FillPasswdCache ¶ added in v1.1.0
FillPasswdCache reads entries from the Vault and uses them to fill the passwd cache.