ovsdb

package
v0.0.0-...-5b448de Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ConnectionPollInterval time.Duration = 4 * time.Second

ConnectionPollInterval poll OVS database every 4 seconds

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

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

Notifier describes a notification based on the monitor

func (Notifier) Disconnected

func (n Notifier) Disconnected(c *libovsdb.OvsdbClient)

Disconnected OVS notifier event

func (Notifier) Echo

func (n Notifier) Echo([]interface{})

Echo OVS notifier event

func (Notifier) Locked

func (n Notifier) Locked([]interface{})

Locked OVS notifier event

func (Notifier) Stolen

func (n Notifier) Stolen([]interface{})

Stolen OVS notifier event

func (Notifier) Update

func (n Notifier) Update(context interface{}, tableUpdates libovsdb.TableUpdates)

Update OVS notifier tables event

type OvsClient

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

OvsClient describes an OVS database client connection

func (*OvsClient) Exec

func (o *OvsClient) Exec(operations ...libovsdb.Operation) ([]libovsdb.OperationResult, error)

Exec execute a transaction on the OVS database

type OvsMonitor

type OvsMonitor struct {
	sync.RWMutex
	Protocol        string
	Target          string
	OvsClient       *OvsClient
	MonitorHandlers []OvsMonitorHandler
	// contains filtered or unexported fields
}

OvsMonitor describes an OVS client Monitor

func NewOvsMonitor

func NewOvsMonitor(protcol string, target string) *OvsMonitor

NewOvsMonitor creates a new monitoring probe agent on target

func (*OvsMonitor) AddMonitorHandler

func (o *OvsMonitor) AddMonitorHandler(handler OvsMonitorHandler)

AddMonitorHandler subscribe a new monitor events handler

func (*OvsMonitor) ExcludeColumn

func (o *OvsMonitor) ExcludeColumn(column string)

ExcludeColumn exclude some column to be monitored

func (*OvsMonitor) StartMonitoring

func (o *OvsMonitor) StartMonitoring()

StartMonitoring start the OVS database monitoring

func (*OvsMonitor) StopMonitoring

func (o *OvsMonitor) StopMonitoring()

StopMonitoring stop the OVS database monitoring

type OvsMonitorHandler

type OvsMonitorHandler interface {
	OnOvsBridgeAdd(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
	OnOvsBridgeDel(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
	OnOvsBridgeUpdate(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
	OnOvsInterfaceAdd(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
	OnOvsInterfaceDel(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
	OnOvsInterfaceUpdate(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
	OnOvsPortAdd(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
	OnOvsPortDel(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
	OnOvsPortUpdate(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
}

OvsMonitorHandler describes an OVS Monitor interface mechanism

Jump to

Keyboard shortcuts

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