Documentation ¶
Overview ¶
Package ratecache provides a cache for the REST clients
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NoopRestClientCache ¶
type NoopRestClientCache struct{}
NoopRestClientCache is a no-op implementation of the interface used for testing
func (*NoopRestClientCache) Get ¶
func (_ *NoopRestClientCache) Get(_, _ string, _ db.ProviderType) (provinfv1.REST, bool)
Get always returns nil, false
func (*NoopRestClientCache) Set ¶
func (_ *NoopRestClientCache) Set(_, _ string, _ db.ProviderType, _ provinfv1.REST)
Set does nothing
type RestClientCache ¶
type RestClientCache interface { Get(owner, token string, provider db.ProviderType) (provinfv1.REST, bool) Set(owner, token string, provider db.ProviderType, rest provinfv1.REST) // Close stops the eviction routine and disallows setting new entries // cache is not cleared, getting existing entries is still allowed Close() }
RestClientCache is the interface for the REST client cache
func NewRestClientCache ¶
func NewRestClientCache(ctx context.Context) RestClientCache
NewRestClientCache creates a new REST client cache
Click to show internal directories.
Click to hide internal directories.