rainbond: github.com/goodrain/rainbond/node/nodem/envoy Index | Files | Directories

package envoy

import "github.com/goodrain/rainbond/node/nodem/envoy"


Package Files

queue.go server_v2.go

type ChainHandler Uses

type ChainHandler struct {
    // contains filtered or unexported fields

ChainHandler applies handlers in a sequence

func (*ChainHandler) Append Uses

func (ch *ChainHandler) Append(h Handler)

Append a handler as the last handler in the chain

func (*ChainHandler) Apply Uses

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

Apply is the handler function

type DiscoverServerManager Uses

type DiscoverServerManager struct {
    // contains filtered or unexported fields

DiscoverServerManager envoy discover server

func CreateDiscoverServerManager Uses

func CreateDiscoverServerManager(clientset kubernetes.Interface, conf option.Conf) (*DiscoverServerManager, error)

CreateDiscoverServerManager create discover server manager

func (*DiscoverServerManager) AddNodeConfig Uses

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

AddNodeConfig add node config cache

func (*DiscoverServerManager) DeleteNodeConfig Uses

func (d *DiscoverServerManager) DeleteNodeConfig(nodeID string)

DeleteNodeConfig delete node config cache

func (*DiscoverServerManager) GetServicesAndEndpoints Uses

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

GetServicesAndEndpoints get service and endpoint

func (*DiscoverServerManager) NewNodeConfig Uses

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

NewNodeConfig new NodeConfig

func (*DiscoverServerManager) Start Uses

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

Start server start

func (*DiscoverServerManager) Stop Uses

func (d *DiscoverServerManager) Stop()

Stop stop grpc server

func (*DiscoverServerManager) UpdateNodeConfig Uses

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

UpdateNodeConfig update node config

type Event Uses

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

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

type Handler Uses

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

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

type Hasher Uses

type Hasher struct {

Hasher returns node ID as an ID

func (Hasher) ID Uses

func (h Hasher) ID(node *envoy_api_v2_core.Node) string

ID function

type NodeConfig Uses

type NodeConfig struct {
    // contains filtered or unexported fields

NodeConfig envoy node config cache struct

func (*NodeConfig) GetID Uses

func (n *NodeConfig) GetID() string

GetID get envoy node config id

func (*NodeConfig) GetVersion Uses

func (n *NodeConfig) GetVersion() string

GetVersion get version

func (*NodeConfig) TryUpdate Uses

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 Uses

func (n *NodeConfig) VersionUpdate()

VersionUpdate add version index

type Queue Uses

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

Queue of work tickets processed using a rate-limiting loop

func NewQueue Uses

func NewQueue(errorDelay time.Duration) Queue

NewQueue instantiates a queue with a processing function

type Task Uses

type Task struct {
    // contains filtered or unexported fields

Task object for the event watchers; processes until handler succeeds

func NewTask Uses

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

NewTask creates a task from a work item



Package envoy imports 24 packages (graph) and is imported by 1 packages. Updated 2020-05-14. Refresh now. Tools for package owners.