xdscache

package
v1.23.2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ObserversOf

func ObserversOf(in []ResourceCache) []dag.Observer

ObserversOf transliterates a slice of ResourceCache into a slice of dag.Observer.

func ResourcesOf

func ResourcesOf(in []ResourceCache) []xds.Resource

ResourcesOf transliterates a slice of ResourceCache into a slice of xds.Resource.

Types

type ResourceCache

type ResourceCache interface {
	dag.Observer
	xds.Resource
}

ResourceCache is a store of an xDS resource type. It is able to visit the dag.DAG to update the its resource collection, then serve those resources over xDS.

type SnapshotHandler

type SnapshotHandler struct {
	logrus.FieldLogger
	// contains filtered or unexported fields
}

SnapshotHandler implements the xDS snapshot cache by responding to the OnChange() event causing a new snapshot to be created.

func NewSnapshotHandler

func NewSnapshotHandler(resources []ResourceCache, logger logrus.FieldLogger) *SnapshotHandler

NewSnapshotHandler returns an instance of SnapshotHandler.

func (*SnapshotHandler) AddSnapshotter added in v1.10.0

func (s *SnapshotHandler) AddSnapshotter(snap Snapshotter)

func (*SnapshotHandler) OnChange

func (s *SnapshotHandler) OnChange(root *dag.DAG)

OnChange is called when the DAG is rebuilt and a new snapshot is needed.

func (*SnapshotHandler) Refresh

func (s *SnapshotHandler) Refresh()

Refresh is called when the EndpointsTranslator updates values in its cache.

type Snapshotter added in v1.10.0

type Snapshotter interface {
	Generate(version string, resources map[envoy_resource_v3.Type][]envoy_types.Resource) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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