envoy

package
v0.1.11 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 LBEvent

type LBEvent struct {
	Svc       kube.Service
	EventType LBEventType
}

LBEvent is the event triggered by kubernetes service changes

type LBEventType

type LBEventType int32

LBEventType is the type of event impacting the LB

const (
	//ADDED represents a service create event
	ADDED LBEventType = iota
	//UPDATED represents a service updated event
	UPDATED
	//DELETED represents a service updated event
	DELETED
)

type LoadBalancer

type LoadBalancer struct {
	sync.RWMutex

	Config          cache.SnapshotCache
	ConfigVersion   int32
	EnvoyConfig     config.EnvoyConfig
	AutoRefreshConn bool
	// contains filtered or unexported fields
}

LoadBalancer represents the current state of upstreams for a load balancer

func NewLB

func NewLB(nodeID string, envoyConfig config.EnvoyConfig, snapshotCache cache.SnapshotCache, autoRefreshConn bool) *LoadBalancer

func (*LoadBalancer) Close

func (lb *LoadBalancer) Close()

func (*LoadBalancer) EndpointTrigger added in v0.1.11

func (lb *LoadBalancer) EndpointTrigger()

func (*LoadBalancer) HandleEvents

func (lb *LoadBalancer) HandleEvents()

func (*LoadBalancer) SnapshotRunner added in v0.1.10

func (lb *LoadBalancer) SnapshotRunner()

func (*LoadBalancer) SvcTrigger

func (lb *LoadBalancer) SvcTrigger(eventType LBEventType, svc *corev1.Service)

func (*LoadBalancer) Trigger

func (lb *LoadBalancer) Trigger(evt LBEvent)

type Logger added in v0.1.10

type Logger struct{}

func (Logger) Errorf added in v0.1.10

func (logger Logger) Errorf(format string, args ...interface{})

func (Logger) Infof added in v0.1.10

func (logger Logger) Infof(format string, args ...interface{})

Jump to

Keyboard shortcuts

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