envoy

package
v5.1.11-release+incomp... Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: LGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainHandler

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

ChainHandler applies handlers in a sequence

func (*ChainHandler) Append

func (ch *ChainHandler) Append(h Handler)

Append a handler as the last handler in the chain

func (*ChainHandler) Apply

func (ch *ChainHandler) Apply(obj interface{}, event Event) error

Apply is the handler function

type DiscoverServerManager

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

DiscoverServerManager envoy discover server

func CreateDiscoverServerManager

func CreateDiscoverServerManager(client kubecache.KubeClient, conf option.Conf) (*DiscoverServerManager, error)

CreateDiscoverServerManager create discover server manager

func (*DiscoverServerManager) AddNodeConfig

func (d *DiscoverServerManager) AddNodeConfig(nc *NodeConfig)

AddNodeConfig add node config cache

func (*DiscoverServerManager) DeleteNodeConfig

func (d *DiscoverServerManager) DeleteNodeConfig(nodeID string)

DeleteNodeConfig delete node config cache

func (*DiscoverServerManager) GetServicesAndEndpoints

func (d *DiscoverServerManager) GetServicesAndEndpoints(namespace string, labelSelector labels.Selector) (ret []*corev1.Service, eret []*corev1.Endpoints)

GetServicesAndEndpoints get service and endpoint

func (*DiscoverServerManager) NewNodeConfig

func (d *DiscoverServerManager) NewNodeConfig(config *corev1.ConfigMap) (*NodeConfig, error)

NewNodeConfig new NodeConfig

func (*DiscoverServerManager) Start

func (d *DiscoverServerManager) Start(errch chan error) error

Start server start

func (*DiscoverServerManager) Stop

func (d *DiscoverServerManager) Stop()

Stop stop grpc server

func (*DiscoverServerManager) UpdateNodeConfig

func (d *DiscoverServerManager) UpdateNodeConfig(nc *NodeConfig) error

UpdateNodeConfig update node config

type Event

type Event int

Event event

const (
	// EventAdd is sent when an object is added
	EventAdd Event = iota

	// EventUpdate is sent when an object is modified
	// Captures the modified object
	EventUpdate

	// EventDelete is sent when an object is deleted
	// Captures the object at the last known state
	EventDelete
)

type Handler

type Handler func(obj interface{}, event Event) error

Handler specifies a function to apply on an object for a given event type

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 NodeConfig

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

NodeConfig envoy node config cache struct

func (*NodeConfig) GetID

func (n *NodeConfig) GetID() string

GetID get envoy node config id

func (*NodeConfig) GetVersion

func (n *NodeConfig) GetVersion() string

GetVersion get version

func (*NodeConfig) TryUpdate

func (n *NodeConfig) TryUpdate(obj interface{}) (needUpdate bool)

TryUpdate try update resources, if don't care about,direct return false if return true, snapshot need update

func (*NodeConfig) VersionUpdate

func (n *NodeConfig) VersionUpdate()

VersionUpdate add version index

type Queue

type Queue interface {
	// Push a ticket
	Push(Task)
	// Run the loop until a signal on the channel
	Run(<-chan struct{})
}

Queue of work tickets processed using a rate-limiting loop

func NewQueue

func NewQueue(errorDelay time.Duration) Queue

NewQueue instantiates a queue with a processing function

type Task

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

Task object for the event watchers; processes until handler succeeds

func NewTask

func NewTask(handler Handler, obj interface{}, event Event) Task

NewTask creates a task from a work item

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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