discovery

package
v0.0.0-...-1a56975 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Identity is a FilterFunc that always returns the original discovery response, unaltered.
	Identity = func(resp *xdsapi.DiscoveryResponse) (*xdsapi.DiscoveryResponse, error) {
		return resp, nil
	}
)

Functions

This section is empty.

Types

type Filter

type Filter struct {
	// DiscoveryAddr is the address of the "real" discovery service whose responses will be filtered.
	DiscoveryAddr string

	// The filtering function to be used for processing discovery responses. If nil, Identity will be used.
	FilterFunc FilterFunc
}

Filter proxies requests to an Envoy discovery service (e.g. Pilot) and filters the responses.

func (*Filter) DeltaAggregatedResources

DeltaAggregatedResources implements the ADS interface.

func (*Filter) Register

func (p *Filter) Register(rpcs *grpc.Server)

Register adds the handlers to the grpc server

func (*Filter) StreamAggregatedResources

func (p *Filter) StreamAggregatedResources(stream ads.AggregatedDiscoveryService_StreamAggregatedResourcesServer) error

StreamAggregatedResources implements the ADS interface.

type FilterFunc

type FilterFunc func(resp *xdsapi.DiscoveryResponse) (*xdsapi.DiscoveryResponse, error)

FilterFunc is a function that allows an application to filter Envoy discovery responses

Jump to

Keyboard shortcuts

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