ingestcache

package
v0.0.48 Latest Latest
Warning

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

Go to latest
Published: May 7, 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 engif.Ingester, entity protoreflect.ProtoMessage, params *structpb.Struct) (*engif.Result, bool)
	Set(ingester engif.Ingester, entity protoreflect.ProtoMessage, params *structpb.Struct, result *engif.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