Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface {
Get(key interface{}) (interface{}, bool)
SetWithTTL(key, value interface{}, cost int64, ttl time.Duration) bool
Del(key interface{})
}
Cache represents caching functionality. Concrete implementation is expected to be thread-safe, and clean up items when ttl is expired.
type Provider ¶
type Provider struct {
Cache Cache
}
Provider provides cache support for sensitive data like unencrypted keys from KeyManager, and Shamir secret shares.
func (*Provider) Wrap ¶
func (p *Provider) Wrap(provider ShamirProvider, cacheTTL time.Duration) ShamirProvider
Wrap adds caching support to the underlying ShamirProvider.
type ShamirProvider ¶
ShamirProvider is an alias for shamir.Provider.
Click to show internal directories.
Click to hide internal directories.