entrycache

package
v0.11.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FetchRegistrationEntriesCache

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

func NewFetchX509SVIDCache(cacheSize int) (*FetchRegistrationEntriesCache, error)

func (*FetchRegistrationEntriesCache) AddWithExpire

func (c *FetchRegistrationEntriesCache) AddWithExpire(key string, value []*common.RegistrationEntry, expire time.Duration)

func (*FetchRegistrationEntriesCache) Get

type RegistrationEntriesCache

type RegistrationEntriesCache interface {
	Get(key string) ([]*common.RegistrationEntry, bool)
	AddWithExpire(key string, value []*common.RegistrationEntry, expire time.Duration)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL