Documentation
¶
Index ¶
- func FetchRegistrationEntries(ctx context.Context, dataStore datastore.DataStore, spiffeID string) ([]*common.RegistrationEntry, error)
- func FetchRegistrationEntriesWithCache(ctx context.Context, dataStore datastore.DataStore, ...) ([]*common.RegistrationEntry, error)
- type FetchRegistrationEntriesCache
- type RegistrationEntriesCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchRegistrationEntriesWithCache ¶ added in v0.10.0
func FetchRegistrationEntriesWithCache(ctx context.Context, dataStore datastore.DataStore, cache RegistrationEntriesCache, spiffeID string) ([]*common.RegistrationEntry, error)
Types ¶
type FetchRegistrationEntriesCache ¶ added in v0.10.0
type FetchRegistrationEntriesCache struct {
Cache *lru.Cache
TimeNow func() time.Time
// contains filtered or unexported fields
}
FetchRegistrationEntriesCache is a wrapper around LRU cache with expiry, used for caching registration entries of a agent
func NewFetchX509SVIDCache ¶ added in v0.10.0
func NewFetchX509SVIDCache(cacheSize int) (*FetchRegistrationEntriesCache, error)
func (*FetchRegistrationEntriesCache) AddWithExpire ¶ added in v0.10.0
func (c *FetchRegistrationEntriesCache) AddWithExpire(key string, value []*common.RegistrationEntry, expire time.Duration)
func (*FetchRegistrationEntriesCache) Get ¶ added in v0.10.0
func (c *FetchRegistrationEntriesCache) Get(key string) ([]*common.RegistrationEntry, bool)
type RegistrationEntriesCache ¶ added in v0.10.0
type RegistrationEntriesCache interface {
Get(key string) ([]*common.RegistrationEntry, bool)
AddWithExpire(key string, value []*common.RegistrationEntry, expire time.Duration)
}
Click to show internal directories.
Click to hide internal directories.