context

package
v0.0.0-...-23e39b4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompositeResourceMapper

func CompositeResourceMapper(mappers ...reconcile.ResourceMapper) reconcile.ResourceMapper

CompositeResourceMapper combines the given ResourceMappers into a single ResourceMapper which calls each in order. If an error occurs, the first one is returned and no further mappers are executed.

func GlobalProvidedFilter

func GlobalProvidedFilter(rm manager.ResourceManager, configs map[string]bool) reconcile.ResourceFilter

func HashSuffixMapper

func HashSuffixMapper(checkDDSFeature bool, labelsToUse ...string) reconcile.ResourceMapper

HashSuffixMapper returns mapper that adds a hash suffix to the name during DDS sync

func MapInsightResourcesZeroGeneration

func MapInsightResourcesZeroGeneration(_ dds.Features, r core_model.Resource) (core_model.Resource, error)

MapInsightResourcesZeroGeneration zeros "generation" field in resources for which the field has only local relevance. This prevents reconciliation from unnecessarily deeming the object to have changed.

func RemoveK8sSystemNamespaceSuffixMapper

func RemoveK8sSystemNamespaceSuffixMapper(k8sSystemNamespace string) reconcile.ResourceMapper

RemoveK8sSystemNamespaceSuffixMapper is a mapper responsible for removing control plane system namespace suffixes from names of resources if resources are stored in kubernetes.

func ZoneProvidedFilter

func ZoneProvidedFilter(_ context.Context, _ string, _ dds.Features, r core_model.Resource) bool

Types

type Context

type Context struct {
	ZoneClientCtx        context.Context
	GlobalProvidedFilter reconcile.ResourceFilter
	ZoneProvidedFilter   reconcile.ResourceFilter
	GlobalServerFilters  []mux.Filter
	// Configs contains the names of system.ConfigResource that will be transferred from Global to Zone
	Configs map[string]bool

	GlobalResourceMapper reconcile.ResourceMapper
	ZoneResourceMapper   reconcile.ResourceMapper

	ServerStreamInterceptors []grpc.StreamServerInterceptor
	ServerUnaryInterceptor   []grpc.UnaryServerInterceptor
}

func DefaultContext

func DefaultContext(
	ctx context.Context,
	manager manager.ResourceManager,
	cfg dubbo_cp.Config,
) *Context

Jump to

Keyboard shortcuts

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