cache

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Hash = cachev3.IDHash{}
)

Functions

This section is empty.

Types

type SnapshotCacheWithCallbacks

type SnapshotCacheWithCallbacks interface {
	cachev3.SnapshotCache
	serverv3.Callbacks
	GenerateNewSnapshot(string, types.XdsResources, context.Context) error
	SnapshotHasIrKey(string) bool
	GetIrKeys() []string
}

SnapshotCacheWithCallbacks uses the go-control-plane SimpleCache to store snapshots of Envoy resources, sliced by Node ID so that we can do incremental xDS properly. It does this by also implementing callbacks to make sure that the cache is kept up to date for each new node.

Having the cache also implement the callbacks is a little bit hacky, but it makes sure that all the required bookkeeping happens. TODO(youngnick): Talk to the go-control-plane maintainers and see if we can upstream this in a better way.

func NewSnapshotCache

func NewSnapshotCache(ads bool, logger logging.Logger) SnapshotCacheWithCallbacks

NewSnapshotCache gives you a fresh SnapshotCache. It needs a logger that supports the go-control-plane required interface (Debugf, Infof, Warnf, and Errorf).

Jump to

Keyboard shortcuts

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