envoy

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 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
	// 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) *LoadBalancer

func (*LoadBalancer) Close

func (lb *LoadBalancer) Close()

func (*LoadBalancer) HandleEvents

func (lb *LoadBalancer) HandleEvents()

func (*LoadBalancer) Snapshot

func (lb *LoadBalancer) Snapshot()

func (*LoadBalancer) SvcTrigger

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

func (*LoadBalancer) Trigger

func (lb *LoadBalancer) Trigger(evt LBEvent)

Jump to

Keyboard shortcuts

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