syncer

package
v1.12.20 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2022 License: Apache-2.0 Imports: 32 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTranslatorSyncer

func NewTranslatorSyncer(
	translator translator.Translator,
	xdsCache envoycache.SnapshotCache,
	sanitizer sanitizer.XdsSanitizer,
	reporter reporter.StatusReporter,
	devMode bool,
	extensions []TranslatorSyncerExtension,
	settings *v1.Settings,
	statusMetrics metrics.ConfigStatusMetrics,
	gatewaySyncer *gwsyncer.TranslatorSyncer,
	proxyClient v1.ProxyClient,
	writeNamespace string,
	identity leaderelector.Identity,
) v1snap.ApiSyncer

Types

type MockXdsCache added in v1.6.11

type MockXdsCache struct {
	Called bool
	// Snap that is set
	SetSnap envoycache.Snapshot
	// Snap that is returned
	GetSnap envoycache.Snapshot
}

func (*MockXdsCache) ClearSnapshot added in v1.6.11

func (*MockXdsCache) ClearSnapshot(node string)

func (*MockXdsCache) CreateWatch added in v1.6.11

func (*MockXdsCache) CreateWatch(envoycache.Request) (value chan envoycache.Response, cancel func())

func (*MockXdsCache) Fetch added in v1.6.11

func (*MockXdsCache) GetSnapshot added in v1.6.11

func (c *MockXdsCache) GetSnapshot(node string) (envoycache.Snapshot, error)

func (*MockXdsCache) GetStatusInfo added in v1.6.11

func (*MockXdsCache) GetStatusInfo(string) envoycache.StatusInfo

func (*MockXdsCache) GetStatusKeys added in v1.6.11

func (c *MockXdsCache) GetStatusKeys() []string

func (*MockXdsCache) SetSnapshot added in v1.6.11

func (c *MockXdsCache) SetSnapshot(node string, snapshot envoycache.Snapshot)

type MockXdsSanitizer added in v1.6.11

type MockXdsSanitizer struct {
	Called bool
	Snap   envoycache.Snapshot
}

func (*MockXdsSanitizer) SanitizeSnapshot added in v1.6.11

func (s *MockXdsSanitizer) SanitizeSnapshot(ctx context.Context, glooSnapshot *v1snap.ApiSnapshot, xdsSnapshot envoycache.Snapshot, reports reporter.ResourceReports) envoycache.Snapshot

type SnapshotSetter added in v1.9.25

type SnapshotSetter interface {
	SetSnapshot(node string, snapshot envoycache.Snapshot)
}

SnapshotSetter sets a response snapshot for a node. It exposes only the Set functionality for a SnapshotCache

type TranslatorSyncerExtension

type TranslatorSyncerExtension interface {
	// ID returns the unique identifier for this TranslatorSyncerExtension
	// This represents the Key in the SnapshotCache where Sync() will store results
	ID() string

	// Sync processes an ApiSnapshot and updates reports with Errors/Warnings that it encounters
	// and updates the SnapshotCache entry if possible
	Sync(
		ctx context.Context,
		snap *v1snap.ApiSnapshot,
		settings *v1.Settings,
		snapshotSetter SnapshotSetter,
		reports reporter.ResourceReports)
}

TranslatorSyncerExtension represents a custom sync behavior that updates an entry in the SnapshotCache

type TranslatorSyncerExtensionFactory added in v0.11.0

type TranslatorSyncerExtensionFactory func(context.Context, TranslatorSyncerExtensionParams) TranslatorSyncerExtension

TranslatorSyncerExtensionFactory generates TranslatorSyncerExtensions

type TranslatorSyncerExtensionParams added in v0.11.0

type TranslatorSyncerExtensionParams struct {
	Hasher                   func(resources []envoycache.Resource) uint64
	RateLimitServiceSettings ratelimit.ServiceSettings
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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