package
0.0.0-20240820180514-79772de91d0a
Repository: https://github.com/tailscale/setec.git
Documentation: pkg.go.dev

# Functions

NewFileCache constructs a new file cache associated with the specified path.
NewFileClient constructs a new FileClient using the contents of the specified local file path.
NewMemCache constructs a new memory cache whose initial contents are s.
NewStore creates a secret store with the given configuration.
NewUpdater creates a new Updater that tracks updates to a value based on new secret versions delivered to w.
ParseFields parses information about setec-tagged fields from v.
StaticFile returns a Secret that vends the contents of path.
StaticSecret returns a Secret that vends a static string value.
StaticTextFile returns a secret that vends the contents of path, which are treated as text with leading and trailing whitespace trimmed.

# Structs

Client is a raw client to the secret management server.
Fields is a helper for plumbing secrets to the fields of struct values.
FileClient is an implementation of the StoreClient interface that vends secrets from a static collection of data stored locally on disk.
MemCache is a trivial implementation of the Cache interface that stores a value in a byte slice.
Store is a store that provides named secrets.
StoreConfig is the configuration for Store.
Struct describes a struct value with tagged fields that should be populated with secrets from a Store.
An Updater tracks a value whose state depends on a secret, together with a watcher for updates to the secret.
A Watcher monitors the current active value of a secret, and allows the user to be notified when the value of the secret changes.

# Interfaces

Cache is an interface that lets a Store persist one piece of data locally.
StoreClient is the interface to the setec API used by the Store.
A Ticker is used to inject time control in to the polling loop of a store.

# Type aliases

FileCache is an implementation of the Cache interface that stores a value in a file at the specified path.
A Secret is a function that fetches the current active value of a secret.