eds

package
v0.0.0-...-f3d1372 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint interface {
	Clusters() []*cp.Cluster
	Routes() []*cp.RouteConfiguration
	CLA() []*cp.ClusterLoadAssignment
	WatchPlan(publish func(*pubsub.Event)) (*watch.Plan, error)
}

Endpoint is an agent catalog service

func NewEndpoint

func NewEndpoint(services []Service, a agent.ConsulAgent, httpRateLimitConfig *config.HTTPHeaderRateLimitConfig, enableHealthCheck bool) Endpoint

NewEndpoint creates an ServiceEndpoint representation

type MockEndpoint

type MockEndpoint struct {
	mock.Mock
}

func (*MockEndpoint) CLA

func (*MockEndpoint) Clusters

func (m *MockEndpoint) Clusters() []*cp.Cluster

func (*MockEndpoint) Routes

func (m *MockEndpoint) Routes() []*cp.RouteConfiguration

func (*MockEndpoint) WatchPlan

func (m *MockEndpoint) WatchPlan(publish func(*pubsub.Event)) (*watch.Plan, error)

type Service

type Service struct {
	Name      string
	Whitelist []string
}

type ServiceHost

type ServiceHost struct {
	Service     string
	IPAddress   string
	Port        int
	Tags        []string
	CreateIndex uint64
	ModifyIndex uint64
}

ServiceHost represents a single host for a service

func NewServiceHost

func NewServiceHost(s *api.CatalogService) ServiceHost

NewServiceHost creates a new service host from a consul catalog service

func (ServiceHost) LbEndpoint

func (h ServiceHost) LbEndpoint() *eds.LbEndpoint

LbEndpoint translates a consul agent service endpoint to an envoy control plane LbEndpoint. If the ServiceHost's port is < 1, the endpoint is assumed to be a Pipe and the IPAddress represents the Pipe's Path.

Jump to

Keyboard shortcuts

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