Documentation ¶
Overview ¶
Package secret provides a simple interface to store and load secrets. It also provides some built-in implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InMemoryManagerWithGCTicker ¶
func InMemoryManagerWithGCTicker(ticker time.Duration) func(*InMemoryManagerOptions)
InMemoryManagerWithGCTicker sets the amount of time that the garbage collector will run. By default, the garbage collector will run every minute.
func InMemoryManagerWithTTL ¶
func InMemoryManagerWithTTL(ttl time.Duration) func(*InMemoryManagerOptions)
InMemoryManagerWithTTL sets the amount of time that the secret will be stored after it is idle (not accessed anymore). By default, the secret will be stored for 15 minutes.
Types ¶
type InMemoryManager ¶
type InMemoryManager struct {
// contains filtered or unexported fields
}
InMemoryManager is a manager that stores the secrets in memory.
func NewInMemoryManager ¶
func NewInMemoryManager(optFuncs ...func(*InMemoryManagerOptions)) *InMemoryManager
NewInMemoryManager creates a new InMemoryManager.
type InMemoryManagerOptions ¶
type InMemoryManagerOptions struct {
// contains filtered or unexported fields
}
InMemoryManagerOptions is used to configure the InMemoryManager.
Click to show internal directories.
Click to hide internal directories.