envoy

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 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
	// 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) GetCache added in v0.1.13

func (lb *LoadBalancer) GetCache() cache.SnapshotCache

func (*LoadBalancer) GetCacheVersion added in v0.1.13

func (lb *LoadBalancer) GetCacheVersion() int32

func (*LoadBalancer) GetUpstreams added in v0.1.13

func (lb *LoadBalancer) GetUpstreams() map[string]kube.Service

func (*LoadBalancer) HandleEvents

func (lb *LoadBalancer) HandleEvents()

func (*LoadBalancer) InitializeUpstream added in v0.1.13

func (lb *LoadBalancer) InitializeUpstream(serviceList *corev1.ServiceList)

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