Versions in this module Expand all Collapse all v0 v0.0.4 Nov 4, 2021 v0.0.3 Oct 21, 2021 Changes in this version + type ProviderRecord struct + AddedAt int64 + Key []byte + Node string + TTL int64 + TTLUnit time.Duration + func NewProviderRecord(key []byte, node string, time int64, ttl int64, unit time.Duration) *ProviderRecord + func (pr *ProviderRecord) HasExpired() bool + type ProviderStore struct + func NewProviderStore(ttl int64, unit time.Duration) *ProviderStore + func (pr *ProviderStore) AddProvider(key []byte, node string) error + func (pr *ProviderStore) Contains(records []*ProviderRecord, node string) bool + func (pr *ProviderStore) GetProvider(key []byte) ([]string, error) + func (pr *ProviderStore) PruneOld() + func (pr *ProviderStore) PruneWorker() + func (pr *ProviderStore) UpdateTTL(records []*ProviderRecord, node string)