envoy

package
v0.0.0-...-46d7da7 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceCluster = "service-cluster"
	ServiceNode    = "service-node"
)

Request parameters for discovery services

View Source
const (
	// EpochFileTemplate is a template for the root config JSON
	EpochFileTemplate = "envoy-rev%d.json"
)
View Source
const (
	// MaxClusterNameLength is the maximum cluster name length
	MaxClusterNameLength = 189 // TODO: use MeshConfig.StatNameLength instead
)

Variables

View Source
var (

	// V2ClearCache is a function to be called when the v1 cache is cleared. This is used to
	// avoid adding a circular dependency from v1 to v2.
	V2ClearCache func()
)

Functions

func GetMixerSAN

func GetMixerSAN(domain, ns string) []string

GetMixerSAN returns the SAN used for mixer mTLS

func GetPilotSAN

func GetPilotSAN(domain, ns string) []string

GetPilotSAN returns the SAN used for pilot mTLS

func NewProxy

func NewProxy(config meshconfig.ProxyConfig, node string, logLevel string, pilotSAN []string) proxy.Proxy

NewProxy creates an instance of the proxy control commands

Types

type CertSource

type CertSource struct {
	// Directory containing certificates
	Directory string
	// Files for certificates
	Files []string
}

CertSource is file source for certificates

type DiscoveryService

type DiscoveryService struct {
	model.Environment

	RestContainer *restful.Container
	// contains filtered or unexported fields
}

DiscoveryService publishes services, clusters, and routes for all proxies

func NewDiscoveryService

func NewDiscoveryService(ctl model.Controller, configCache model.ConfigStoreCache,
	environment model.Environment, o DiscoveryServiceOptions) (*DiscoveryService, error)

NewDiscoveryService creates an Envoy discovery service on a given port

func (*DiscoveryService) AvailabilityZone

func (ds *DiscoveryService) AvailabilityZone(request *restful.Request, response *restful.Response)

AvailabilityZone responds to requests for an AZ for the given cluster node

func (*DiscoveryService) ClearCache

func (ds *DiscoveryService) ClearCache()

ClearCache is wrapper for clearCache method, used when new controller gets instantiated dynamically

func (*DiscoveryService) ClearCacheStats

func (ds *DiscoveryService) ClearCacheStats(_ *restful.Request, _ *restful.Response)

ClearCacheStats clear the statistics for cached discovery responses.

func (*DiscoveryService) GetCacheStats

func (ds *DiscoveryService) GetCacheStats(_ *restful.Request, response *restful.Response)

GetCacheStats returns the statistics for cached discovery responses.

func (*DiscoveryService) ListAllEndpoints

func (ds *DiscoveryService) ListAllEndpoints(_ *restful.Request, response *restful.Response)

ListAllEndpoints responds with all Services and is not restricted to a single service-key

func (*DiscoveryService) Register

func (ds *DiscoveryService) Register(container *restful.Container)

Register adds routes a web service container. This is visible for testing purposes only.

type DiscoveryServiceOptions

type DiscoveryServiceOptions struct {
	// The listening address for HTTP. If the port in the address is empty or "0" (as in "127.0.0.1:" or "[::1]:0")
	// a port number is automatically chosen.
	HTTPAddr string

	// The listening address for GRPC. If the port in the address is empty or "0" (as in "127.0.0.1:" or "[::1]:0")
	// a port number is automatically chosen.
	GrpcAddr string

	// The listening address for secure GRPC. If the port in the address is empty or "0" (as in "127.0.0.1:" or "[::1]:0")
	// a port number is automatically chosen.
	SecureGrpcAddr string

	// The listening address for the monitoring port. If the port in the address is empty or "0" (as in "127.0.0.1:" or "[::1]:0")
	// a port number is automatically chosen.
	MonitoringAddr string

	EnableProfiling bool
	EnableCaching   bool
	WebhookEndpoint string
}

DiscoveryServiceOptions contains options for create a new discovery service instance.

type Watcher

type Watcher interface {
	// Run the watcher loop (blocking call)
	Run(context.Context)

	// Reload the agent with the latest configuration
	Reload()
}

Watcher triggers reloads on changes to the proxy config

func NewWatcher

func NewWatcher(config meshconfig.ProxyConfig, agent proxy.Agent, role model.Proxy,
	certs []CertSource, pilotSAN []string) Watcher

NewWatcher creates a new watcher instance from a proxy agent and a set of monitored certificate paths (directories with files in them)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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