xds

package
v0.0.0-...-0178fca Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2018 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// XdsCluster is the cluster name for the control server (used by non-ADS set-up)
	XdsCluster = "xds_cluster"
)

Variables

This section is empty.

Functions

func FindSnapshotByName

func FindSnapshotByName(snapshots map[*model.Host]*cache.Snapshot, hostname string) (*cache.Snapshot, bool)

FindSnapshotByName finds a snapshot by hostname from a snapshot map

func MakeEDSCluster

func MakeEDSCluster(clusterName string, timeout time.Duration) *v2.Cluster

MakeEDSCluster creates a EDS cluster.

func MakeEndpoint

func MakeEndpoint(clusterName string, addresses []model.Address) *v2.ClusterLoadAssignment

MakeEndpoint creates a endpoint on a given address.

func MakeHTTPListener

func MakeHTTPListener(p *httpListenerParam) (*v2.Listener, error)

MakeHTTPListener creates a listener using either ADS or RDS for the route.

func MakeRoute

func MakeRoute(routeName, clusterName string, traceSpan string) *v2.RouteConfiguration

MakeRoute creates an HTTP route that routes to a given cluster.

func MakeTCPListener

func MakeTCPListener(listenerName string, address model.Address, clusterName string, statPrefix string, logfileDir string, logfileName string) (*v2.Listener, error)

MakeTCPListener creates a TCP listener for a cluster.

Types

type HTTPHealthCheck

type HTTPHealthCheck struct {
	Enabled     bool
	PassThrough bool
	Endpoint    string
	CacheTime   time.Duration
}

HTTPHealthCheck TODO: to be able to configure via ctlapi

func NewDefaultPassThroghHTTPHealthCheck

func NewDefaultPassThroghHTTPHealthCheck() *HTTPHealthCheck

NewDefaultPassThroghHTTPHealthCheck creates default health check configuration.

func NewDisabledHTTPHealthCheck

func NewDisabledHTTPHealthCheck() *HTTPHealthCheck

NewDisabledHTTPHealthCheck creates default health check configuration.

type Hasher

type Hasher struct {
}

Hasher returns node ID as an ID

func (Hasher) ID

func (h Hasher) ID(node *core.Node) string

ID function

type SnapshotGen

type SnapshotGen interface {
	MakeSnapshotsOfService(serviceName string) (snapshots map[*model.Host]*cache.Snapshot, err error)
}

func NewSnapshotGen

func NewSnapshotGen(is mcore.InventoryService, logger *logrus.Logger, vg mcore.VersionGenerator, envoyConf model.EnvoyConf) SnapshotGen

NewSnapshotGen creates snapshot generator instance.

type XDSServer

type XDSServer interface {
	RunXDS() (*grpc.Server, error)
	RunSnapshotCollector()
}

func NewXDSServer

func NewXDSServer(inventory mcore.InventoryService, vb mcore.VersionGenerator, conf model.MeshemConf, ctx context.Context, logger *logrus.Logger) XDSServer

NewXDSServer creates a xds server.

Jump to

Keyboard shortcuts

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