monitor

package
v0.0.0-...-e1628ab Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LocalEndpointIdentity = "attached-mac"
	LocalEndpointIPv4     = "attached-ipv4"
	InterfaceDriver       = "driver_name"
	InterfaceStatus       = "status"
	AgentInfoSyncInterval = 60

	VMNicDriver  = "tun"
	PodNicDriver = "veth"
)
View Source
const (
	OvsDBBridgeTable    = "Bridge"
	OvsDBPortTable      = "Port"
	OvsDBInterfaceTable = "Interface"

	OvsdbUpdatesChanSize = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentMonitor

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

AgentMonitor monitor agent state, update agentinfo to apiserver.

func NewAgentMonitor

func NewAgentMonitor(opts *NewAgentMonitorOptions) *AgentMonitor

NewAgentMonitor return a new agentMonitor with kubernetes client and ipMonitor.

func (*AgentMonitor) Name

func (monitor *AgentMonitor) Name() string

func (*AgentMonitor) Run

func (monitor *AgentMonitor) Run(stopChan <-chan struct{})

type NewAgentMonitorOptions

type NewAgentMonitorOptions struct {
	DisableProbeTimeoutIP  bool
	ProbeTimeoutIPCallback func(ctx context.Context, endpointIP *types.EndpointIP) error
	Clientset              clientset.Interface
	OVSDBMonitor           *OVSDBMonitor
	OFPortIPMonitorChan    chan *types.EndpointIP
}

type OVSDBCache

type OVSDBCache map[string]map[string]ovsdb.Row

type OVSDBMonitor

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

OVSDBMonitor monitor and cache ovsdb, the syncQueue are queued on cache updates

func NewOVSDBMonitor

func NewOVSDBMonitor() (*OVSDBMonitor, error)

NewOVSDBMonitor create a new instance of OVSDBMonitor

func (*OVSDBMonitor) GetSyncQueue

func (monitor *OVSDBMonitor) GetSyncQueue() workqueue.RateLimitingInterface

func (*OVSDBMonitor) LockedAccessCache

func (monitor *OVSDBMonitor) LockedAccessCache(readFunc func(OVSDBCache) error) error

func (*OVSDBMonitor) RegisterOvsdbEventHandler

func (monitor *OVSDBMonitor) RegisterOvsdbEventHandler(ovsdbEventHandler ovsdbEventHandler)

func (*OVSDBMonitor) Run

func (monitor *OVSDBMonitor) Run(stopChan <-chan struct{})

type OvsdbEventHandlerFuncs

type OvsdbEventHandlerFuncs struct {
	LocalEndpointAddFunc    func(endpoint *datapath.Endpoint)
	LocalEndpointDeleteFunc func(endpoint *datapath.Endpoint)
	LocalEndpointUpdateFunc func(newEndpoint *datapath.Endpoint, oldEndpoint *datapath.Endpoint)
}

func (OvsdbEventHandlerFuncs) AddLocalEndpoint

func (handler OvsdbEventHandlerFuncs) AddLocalEndpoint(endpoint *datapath.Endpoint)

func (OvsdbEventHandlerFuncs) DeleteLocalEndpoint

func (handler OvsdbEventHandlerFuncs) DeleteLocalEndpoint(endpoint *datapath.Endpoint)

func (OvsdbEventHandlerFuncs) UpdateLocalEndpoint

func (handler OvsdbEventHandlerFuncs) UpdateLocalEndpoint(newEndpoint *datapath.Endpoint, oldEndpoint *datapath.Endpoint)

Jump to

Keyboard shortcuts

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