xds

package
v0.0.0-...-4760111 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CircuitBreakerMap

type CircuitBreakerMap map[ServiceName]*mesh_core.CircuitBreakerResource

CircuitBreakerMap holds the most specific CircuitBreaker for each reachable service.

type DataplaneMetadata

type DataplaneMetadata struct {
	DataplaneTokenPath string
	AdminPort          uint32
}

DataplaneMetadata represents environment-specific part of a dataplane configuration.

This information might change from one dataplane run to another and therefore it cannot be a part of Dataplane resource.

On start-up, a dataplane captures its effective configuration (that might come from a file, environment variables and command line options) and includes it into request for a bootstrap config. Control Plane can use this information to fill in node metadata in the bootstrap config. Envoy will include node metadata from the bootstrap config at least into the very first discovery request on every xDS stream. This way, xDS server will be able to use Envoy node metadata to generate xDS resources that depend on environment-specific configuration.

func DataplaneMetadataFromNode

func DataplaneMetadataFromNode(node *envoy_core.Node) *DataplaneMetadata

func (*DataplaneMetadata) GetAdminPort

func (m *DataplaneMetadata) GetAdminPort() uint32

func (*DataplaneMetadata) GetDataplaneTokenPath

func (m *DataplaneMetadata) GetDataplaneTokenPath() string

type DestinationMap

type DestinationMap map[ServiceName]TagSelectorSet

DestinationMap holds a set of selectors for all reachable Dataplanes grouped by service name.

type Endpoint

type Endpoint struct {
	Target string
	Port   uint32
	Tags   map[string]string
}

Endpoint holds routing-related information about a single endpoint.

type EndpointList

type EndpointList []Endpoint

EndpointList is a list of Endpoints with convenience methods.

func (EndpointList) Filter

func (l EndpointList) Filter(selector mesh_proto.TagSelector) EndpointList

type EndpointMap

type EndpointMap map[ServiceName][]Endpoint

EndpointMap holds routing-related information about a set of endpoints grouped by service name.

type FaultInjectionMap

FaultInjectionMap holds the most specific FaultInjectionResource for each InboundInterface

type HealthCheckMap

type HealthCheckMap map[ServiceName]*mesh_core.HealthCheckResource

HealthCheckMap holds the most specific HealthCheck for each reachable service.

type LogMap

LogMap holds the most specific TrafficLog for each outbound interface of a Dataplane.

type NamedResourcePayload

type NamedResourcePayload interface {
	ResourcePayload
	GetName() string
}

type Proxy

type Proxy struct {
	Id                 ProxyId
	Dataplane          *mesh_core.DataplaneResource
	TrafficPermissions TrafficPermissionMap
	Logs               LogMap
	TrafficRoutes      RouteMap
	OutboundSelectors  DestinationMap
	OutboundTargets    EndpointMap
	HealthChecks       HealthCheckMap
	CircuitBreakers    CircuitBreakerMap
	TrafficTrace       *mesh_core.TrafficTraceResource
	TracingBackend     *mesh_proto.TracingBackend
	Metadata           *DataplaneMetadata
	FaultInjections    FaultInjectionMap
}

type ProxyId

type ProxyId struct {
	Mesh string
	Name string
}

func BuildProxyId

func BuildProxyId(mesh, name string, more ...string) (*ProxyId, error)

func FromResourceKey

func FromResourceKey(key core_model.ResourceKey) ProxyId

func ParseProxyId

func ParseProxyId(node *envoy_core.Node) (*ProxyId, error)

func ParseProxyIdFromString

func ParseProxyIdFromString(id string) (*ProxyId, error)

func (ProxyId) String

func (id ProxyId) String() string

func (*ProxyId) ToResourceKey

func (id *ProxyId) ToResourceKey() core_model.ResourceKey

type Resource

type Resource struct {
	Name     string
	Version  string
	Resource ResourcePayload
}

Resource represents a generic xDS resource with name and version.

type ResourceList

type ResourceList []*Resource

ResourceList represents a list of generic xDS resources.

func (ResourceList) ToDeltaDiscoveryResponse

func (rs ResourceList) ToDeltaDiscoveryResponse() (*envoy.DeltaDiscoveryResponse, error)

func (ResourceList) ToIndex

func (rs ResourceList) ToIndex() map[string]ResourcePayload

type ResourcePayload

type ResourcePayload = envoy_types.Resource

ResourcePayload is a convenience type alias.

type ResourceSet

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

ResourceSet represents a set of generic xDS resources.

func (*ResourceSet) Add

func (s *ResourceSet) Add(resources ...*Resource) *ResourceSet

func (*ResourceSet) AddNamed

func (s *ResourceSet) AddNamed(namedPayloads ...NamedResourcePayload) *ResourceSet

func (*ResourceSet) Contains

func (s *ResourceSet) Contains(name string, resource ResourcePayload) bool

func (*ResourceSet) List

func (s *ResourceSet) List() []*Resource

type RouteMap

RouteMap holds the most specific TrafficRoute for each outbound interface of a Dataplane.

type ServiceName

type ServiceName = string

ServiceName is a convenience type alias to clarify the meaning of string value.

type StreamID

type StreamID = int64

StreamID represents a stream opened by XDS

type TagSelectorSet

type TagSelectorSet []mesh_proto.TagSelector

TagSelectorSet is a set of unique TagSelectors.

func (TagSelectorSet) Add

type TrafficPermissionMap

TrafficPermissionMap holds the most specific TrafficPermissionResource for each InboundInterface

type XdsContext

type XdsContext interface {
	Hasher() envoy_cache.NodeHash
	Cache() envoy_cache.SnapshotCache
}

func NewXdsContext

func NewXdsContext() XdsContext

Jump to

Keyboard shortcuts

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