Documentation
¶
Overview ¶
Package ingestcache a cache that is used to cache the results of ingesting data. The intent is to reduce the number of calls to external services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBuildingCacheKey = errors.New("error building cache key")
ErrBuildingCacheKey is the error returned when building a cache key fails
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface {
Get(ingester interfaces.Ingester, entity protoreflect.ProtoMessage, params map[string]any) (*interfaces.Ingested, bool)
Set(ingester interfaces.Ingester, entity protoreflect.ProtoMessage, params map[string]any, result *interfaces.Ingested)
}
Cache is the interface for the ingest cache.
type NoopCache ¶
type NoopCache struct {
}
NoopCache is the interface for the ingest cache.
func (*NoopCache) Get ¶
func (*NoopCache) Get( _ interfaces.Ingester, _ protoreflect.ProtoMessage, _ map[string]any, ) (*interfaces.Ingested, bool)
Get implements the Cache interface but does nothing
func (*NoopCache) Set ¶
func (*NoopCache) Set( _ interfaces.Ingester, _ protoreflect.ProtoMessage, _ map[string]any, _ *interfaces.Ingested, )
Set implements the Cache interface but does nothing
Click to show internal directories.
Click to hide internal directories.