cache

package
v0.0.0-...-01c4e9a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetResourceName

func GetResourceName(res envoy_types.Resource) string

func IndexResourcesByName

func IndexResourcesByName(items []envoy_types.ResourceWithTTL) map[string]envoy_types.ResourceWithTTL

IndexResourcesByName creates a map from the resource name to the resource. Name should be unique across meshes that's why Name is <name>.<mesh>

Types

type ResourceBuilder

type ResourceBuilder interface{}

type ResourceVersionMap

type ResourceVersionMap map[core_model.ResourceType]util.NameToVersion

type Snapshot

type Snapshot struct {
	Resources map[core_model.ResourceType]envoy_cache.Resources

	// VersionMap holds the current hash map of all resources in the snapshot.
	// This field should remain nil until it is used, at which point should be
	// instantiated by calling ConstructVersionMap().
	// VersionMap is only to be used with delta xDS.
	VersionMap ResourceVersionMap
}

Snapshot is an internally consistent snapshot of xDS resources.

func (*Snapshot) ConstructVersionMap

func (s *Snapshot) ConstructVersionMap() error

ConstructVersionMap will construct a version map based on the current state of a snapshot

func (*Snapshot) GetResources

func (s *Snapshot) GetResources(typ string) map[string]envoy_types.Resource

func (*Snapshot) GetResourcesAndTTL

func (s *Snapshot) GetResourcesAndTTL(typ string) map[string]envoy_types.ResourceWithTTL

func (*Snapshot) GetVersion

func (s *Snapshot) GetVersion(typ string) string

func (*Snapshot) GetVersionMap

func (s *Snapshot) GetVersionMap(typeURL string) map[string]string

type SnapshotBuilder

type SnapshotBuilder interface {
	With(typ core_model.ResourceType, resources []envoy_types.Resource) SnapshotBuilder
	Build(version string) envoy_cache.ResourceSnapshot
}

func NewSnapshotBuilder

func NewSnapshotBuilder() SnapshotBuilder

Jump to

Keyboard shortcuts

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