regentryutil

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchRegistrationEntries

func FetchRegistrationEntries(ctx context.Context, dataStore datastore.DataStore, spiffeID string) ([]*common.RegistrationEntry, error)

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

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)
}

Jump to

Keyboard shortcuts

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