Documentation ¶
Index ¶
- func GetKeyFromProxyMeta(proxy *gloov1.Proxy) string
- func NewTranslatorSyncer(ctx context.Context, translator translator.Translator, ...) v1snap.ApiSyncer
- type MockXdsCache
- func (*MockXdsCache) ClearSnapshot(node string)
- func (*MockXdsCache) CreateWatch(envoycache.Request) (value chan envoycache.Response, cancel func())
- func (*MockXdsCache) Fetch(context.Context, envoycache.Request) (*envoycache.Response, error)
- func (c *MockXdsCache) GetSnapshot(node string) (envoycache.Snapshot, error)
- func (*MockXdsCache) GetStatusInfo(string) envoycache.StatusInfo
- func (c *MockXdsCache) GetStatusKeys() []string
- func (c *MockXdsCache) SetSnapshot(node string, snapshot envoycache.Snapshot)
- type MockXdsSanitizer
- type NoOpSnapshotSetter
- type OnProxiesTranslatedFn
- type SnapshotSetter
- type TranslatorSyncerExtension
- type TranslatorSyncerExtensionFactory
- type TranslatorSyncerExtensionParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKeyFromProxyMeta ¶
func NewTranslatorSyncer ¶
func NewTranslatorSyncer( ctx context.Context, 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, onProxyTranslated OnProxiesTranslatedFn, ) 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) Fetch(context.Context, envoycache.Request) (*envoycache.Response, error)
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 NoOpSnapshotSetter ¶ added in v1.13.0
type NoOpSnapshotSetter struct{}
NoOpSnapshotSetter does nothing in it's interface
func (*NoOpSnapshotSetter) SetSnapshot ¶ added in v1.13.0
func (n *NoOpSnapshotSetter) SetSnapshot(node string, snapshot envoycache.Snapshot)
SetSnapshot does nothing, it is a no-op function
type OnProxiesTranslatedFn ¶ added in v1.17.0
type OnProxiesTranslatedFn func(ctx context.Context, proxiesWithReports []translatorutils.ProxyWithReports)
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, error) RateLimitServiceSettings *ratelimit.ServiceSettings }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.