xds

package
v0.0.0-...-de451ab Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCluster

func AddCluster(c *Cluster) *v2.Cluster

func AddHTTPConnectionManager

func AddHTTPConnectionManager(r *RouteConfig) *types.Struct

func AddHost

func AddHost(h Host) *core.Address

func AddListener

func AddListener(l *Listener, configStruct *types.Struct) *v2.Listener

func AddRoute

func AddRoute(r Route) *route.Route

func AddRouteConfig

func AddRouteConfig(r *RouteConfig) *v2.RouteConfiguration

func XDSResource

func XDSResource(x interface {
	Equal(interface{}) bool
	proto.Message
}) []cache.Resource

Types

type Cluster

type Cluster struct {
	Name           string
	ConnectTimeout time.Duration
	SNI            string
	Hosts          []Host
}

type Config

type Config struct {
	Version     string
	Listeners   []Listener
	Clusters    []Cluster
	RouteConfig RouteConfig
}

func (*Config) Make

func (c *Config) Make() ([]cache.Resource, []cache.Resource)

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 Host

type Host struct {
	Name string
	Port int
}

type Listener

type Listener struct {
	Name    string
	Port    int
	Address string
}

type Route

type Route struct {
	Regex  string
	Prefix string
	Action RouteAction
}

type RouteAction

type RouteAction struct {
	ClusterName   string
	PrefixRewrite string
}

type RouteConfig

type RouteConfig struct {
	Name    string
	Domains []string
	Routes  []Route
}

Jump to

Keyboard shortcuts

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