reconcile

package
v0.0.0-...-ae413d2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func And

func And(fs ...func(core_model.Resource) bool) func(core_model.Resource) bool

func IsKubernetes

func IsKubernetes(storeType config_store.StoreType) func(core_model.Resource) bool

func NameHasPrefix

func NameHasPrefix(prefix string) func(core_model.Resource) bool

func NoopResourceMapper

func NoopResourceMapper(_ dds.Features, r model.Resource) (model.Resource, error)

func Not

func Not(f func(core_model.Resource) bool) func(core_model.Resource) bool

func TypeIs

func TypeIs(rtype core_model.ResourceType) func(core_model.Resource) bool

Types

type Reconciler

type Reconciler interface {
	// Reconcile reconciles state of node given changed resource types.
	// Returns error and bool which is true if any resource was changed.
	Reconcile(context.Context, *envoy_core.Node, map[model.ResourceType]struct{}, logr.Logger) (error, bool)
	Clear(context.Context, *envoy_core.Node) error
}

Reconciler re-computes configuration for a given node.

func NewReconciler

func NewReconciler(hasher envoy_cache.NodeHash, cache envoy_cache.SnapshotCache, generator SnapshotGenerator, mode config_core.CpMode, statsCallbacks xds.StatsCallbacks) Reconciler

type ResourceFilter

type ResourceFilter func(ctx context.Context, clusterID string, features dds.Features, r core_model.Resource) bool

type ResourceMapper

type ResourceMapper func(features dds.Features, r core_model.Resource) (core_model.Resource, error)

func If

func If(condition func(core_model.Resource) bool, m ResourceMapper) ResourceMapper

type SnapshotGenerator

type SnapshotGenerator interface {
	GenerateSnapshot(context.Context, *envoy_core.Node, cache_dds.SnapshotBuilder, map[model.ResourceType]struct{}) (envoy_cache.ResourceSnapshot, error)
}

Generates a snapshot of xDS resources for a given node.

func NewSnapshotGenerator

func NewSnapshotGenerator(resourceManager core_manager.ReadOnlyResourceManager, filter ResourceFilter, mapper ResourceMapper) SnapshotGenerator

Jump to

Keyboard shortcuts

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