store

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	Address string
	Port    int
}

type NodeConfig

type NodeConfig struct {
	Endpoints map[string]*Endpoint
	ProxyName string
	// contains filtered or unexported fields
}

type SotwStore

type SotwStore struct {
	Nodes map[string]*NodeConfig
	// contains filtered or unexported fields
}

SotwStore stores the State of the World as the controller sees it. It contains channels that can be used to communicate with the xds cache on changes. This is thread safe as every modification is done behind a mutex.

func NewSotWStore

func NewSotWStore(updates chan NodeConfig, deletes chan string, logger *zap.SugaredLogger) *SotwStore

func (*SotwStore) AddReceiver

func (s *SotwStore) AddReceiver(proxyName string, port int, address string, podName string)

func (*SotwStore) AddSender

func (s *SotwStore) AddSender(proxyName string)

func (*SotwStore) RemoveReceiver

func (s *SotwStore) RemoveReceiver(proxyName string, podName string)

RemoveReceiver deletes a receiver from a node if it exists. The xds server is notified of the change if one occurs

func (*SotwStore) RemoveSender

func (s *SotwStore) RemoveSender(proxyName string) bool

/ RemoveSender removes a quilkin proxy node/sender and returns whether or not its the last instance / using that proxyName. If a node is removed the xds server is notified of the change.

Jump to

Keyboard shortcuts

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