ingestcache

package
v0.0.76 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

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.Result, bool)
	Set(ingester interfaces.Ingester, entity protoreflect.ProtoMessage, params map[string]any, result *interfaces.Result)
}

Cache is the interface for the ingest cache.

func NewCache

func NewCache() Cache

NewCache returns a new cache

func NewNoopCache

func NewNoopCache() Cache

NewNoopCache returns a new NoopCache

type NoopCache

type NoopCache struct {
}

NoopCache is the interface for the ingest cache.

func (*NoopCache) Get

Get implements the Cache interface but does nothing

func (*NoopCache) Set

Set implements the Cache interface but does nothing

Jump to

Keyboard shortcuts

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