Documentation ¶
Overview ¶
Package nsscache greatly simplifies the task of writing cache filling applications for libnss-cache by encapsulating the tasks of writing the caches, cache indexes, and doing so atomically into a reusable library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteAtomic ¶
WriteAtomic allows atomic updates to files by first writing to a temporary file, setting all parameters on the temporary file and renaming it to the desired name. On most Linux systems this will be an atomic action.
Types ¶
type CacheMap ¶
CacheMap allows you to manage the caches as a group.
func (*CacheMap) FillCaches ¶
FillCaches uses the provided source to fill the caches of the CacheMap struct.
func (*CacheMap) WriteFiles ¶
func (cm *CacheMap) WriteFiles(options *WriteOptions) error
WriteFiles write the content of the cache structs into files that libnss-cache can read.
type WriteOptions ¶
WriteOptions specifies optional values for writing the caches out. The directory will default to '/etc' and the Extension will default to 'cache'.
Directories ¶
Path | Synopsis |
---|---|
Package cache contains the types and convenience functions for manipulating caches in memory prior to writing to the disk.
|
Package cache contains the types and convenience functions for manipulating caches in memory prior to writing to the disk. |
examples
|
|
nsscache-vault
example showing how to use vault with nsscache to write files readable by libnss-cache
|
example showing how to use vault with nsscache to write files readable by libnss-cache |
Package source defines the interfaces that fill caches.
|
Package source defines the interfaces that fill caches. |
vault
Package vault is a source implementation that retrieves cache data from a path in a Hashicorp Vault key/value store.
|
Package vault is a source implementation that retrieves cache data from a path in a Hashicorp Vault key/value store. |