sanitizer

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2019 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RouteReplacingSanitizer

type RouteReplacingSanitizer struct {
	// contains filtered or unexported fields
}

func (*RouteReplacingSanitizer) SanitizeSnapshot

func (s *RouteReplacingSanitizer) SanitizeSnapshot(ctx context.Context, glooSnapshot *v1.ApiSnapshot, xdsSnapshot envoycache.Snapshot, reports reporter.ResourceReports) (envoycache.Snapshot, error)

type UpstreamRemovingSanitizer

type UpstreamRemovingSanitizer struct{}

func NewUpstreamRemovingSanitizer

func NewUpstreamRemovingSanitizer() *UpstreamRemovingSanitizer

func (*UpstreamRemovingSanitizer) SanitizeSnapshot

func (s *UpstreamRemovingSanitizer) SanitizeSnapshot(ctx context.Context, glooSnapshot *v1.ApiSnapshot, xdsSnapshot envoycache.Snapshot, reports reporter.ResourceReports) (envoycache.Snapshot, error)

If there are any errors on upstreams, this function tries to remove the correspondent clusters and endpoints from the xDS snapshot. If the snapshot is still consistent after these mutations and there are no errors related to other resources, we are good to send it to Envoy.

type XdsSanitizer

type XdsSanitizer interface {
	SanitizeSnapshot(ctx context.Context, glooSnapshot *v1.ApiSnapshot, xdsSnapshot envoycache.Snapshot, reports reporter.ResourceReports) (envoycache.Snapshot, error)
}

an XdsSanitizer modifies an xds snapshot before it is stored in the xds cache the if the sanitizer returns an error, Gloo will not update the xds cache with the snapshot else Gloo will assume the snapshot is valid to send to Envoy

type XdsSanitizers

type XdsSanitizers []XdsSanitizer

func (XdsSanitizers) SanitizeSnapshot

func (s XdsSanitizers) SanitizeSnapshot(ctx context.Context, glooSnapshot *v1.ApiSnapshot, xdsSnapshot envoycache.Snapshot, reports reporter.ResourceReports) (envoycache.Snapshot, error)

Jump to

Keyboard shortcuts

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