Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrKeyNotFound = errors.New("cache key not found")
ErrKeyNotFound means the key did not exist in the cache
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[Key, Value any] interface { Set(ctx context.Context, key Key, value Value, expires bool) error SetExpirable(ctx context.Context, key Key, expires bool) error Get(ctx context.Context, key Key) (Value, error) }
Cache describes a generic cache interface
type ContentClaimsStore ¶
type ContentClaimsStore Cache[cid.Cid, delegation.Delegation]
ContentClaimsStore caches fetched content claims
type ContextID ¶
ContextID describes the data used to calculate a context id for IPNI
func (ContextID) ToEncoded ¶
func (c ContextID) ToEncoded() (EncodedContextID, error)
ToEncoded canonically encodes ContextID data
type EncodedContextID ¶
type EncodedContextID []byte
EncodedContextID is the encoded form of context id data that is actually stored in IPNI
type ProviderStore ¶
type ProviderStore Cache[mh.Multihash, []model.ProviderResult]
ProviderStore caches queries to IPNI
type ShardedDagIndexStore ¶
type ShardedDagIndexStore Cache[EncodedContextID, blobindex.ShardedDagIndexView]
ShardedDagIndexStore caches fetched sharded dag indexes
Click to show internal directories.
Click to hide internal directories.