Documentation ¶
Index ¶
- Constants
- type DefaultOvsMonitorHandler
- func (d *DefaultOvsMonitorHandler) OnConnected(monitor *OvsMonitor)
- func (d *DefaultOvsMonitorHandler) OnDisconnected(monitor *OvsMonitor)
- func (d *DefaultOvsMonitorHandler) OnOvsBridgeAdd(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
- func (d *DefaultOvsMonitorHandler) OnOvsBridgeDel(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
- func (d *DefaultOvsMonitorHandler) OnOvsBridgeUpdate(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
- func (d *DefaultOvsMonitorHandler) OnOvsInterfaceAdd(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
- func (d *DefaultOvsMonitorHandler) OnOvsInterfaceDel(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
- func (d *DefaultOvsMonitorHandler) OnOvsInterfaceUpdate(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
- func (d *DefaultOvsMonitorHandler) OnOvsPortAdd(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
- func (d *DefaultOvsMonitorHandler) OnOvsPortDel(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
- func (d *DefaultOvsMonitorHandler) OnOvsPortUpdate(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
- func (d *DefaultOvsMonitorHandler) OnOvsUpdate(monitor *OvsMonitor, row *libovsdb.RowUpdate)
- type Notifier
- type OvsClient
- type OvsMonitor
- type OvsMonitorHandler
Constants ¶
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 DefaultOvsMonitorHandler ¶
type DefaultOvsMonitorHandler struct { }
DefaultOvsMonitorHandler default implementation of an handler
func (*DefaultOvsMonitorHandler) OnConnected ¶
func (d *DefaultOvsMonitorHandler) OnConnected(monitor *OvsMonitor)
OnConnected default implementation
func (*DefaultOvsMonitorHandler) OnDisconnected ¶
func (d *DefaultOvsMonitorHandler) OnDisconnected(monitor *OvsMonitor)
OnDisconnected default implementation
func (*DefaultOvsMonitorHandler) OnOvsBridgeAdd ¶
func (d *DefaultOvsMonitorHandler) OnOvsBridgeAdd(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
OnOvsBridgeAdd default implementation
func (*DefaultOvsMonitorHandler) OnOvsBridgeDel ¶
func (d *DefaultOvsMonitorHandler) OnOvsBridgeDel(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
OnOvsBridgeDel default implementation
func (*DefaultOvsMonitorHandler) OnOvsBridgeUpdate ¶
func (d *DefaultOvsMonitorHandler) OnOvsBridgeUpdate(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
OnOvsBridgeUpdate default implementation
func (*DefaultOvsMonitorHandler) OnOvsInterfaceAdd ¶
func (d *DefaultOvsMonitorHandler) OnOvsInterfaceAdd(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
OnOvsInterfaceAdd default implementation
func (*DefaultOvsMonitorHandler) OnOvsInterfaceDel ¶
func (d *DefaultOvsMonitorHandler) OnOvsInterfaceDel(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
OnOvsInterfaceDel default implementation
func (*DefaultOvsMonitorHandler) OnOvsInterfaceUpdate ¶
func (d *DefaultOvsMonitorHandler) OnOvsInterfaceUpdate(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
OnOvsInterfaceUpdate default implementation
func (*DefaultOvsMonitorHandler) OnOvsPortAdd ¶
func (d *DefaultOvsMonitorHandler) OnOvsPortAdd(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
OnOvsPortAdd default implementation
func (*DefaultOvsMonitorHandler) OnOvsPortDel ¶
func (d *DefaultOvsMonitorHandler) OnOvsPortDel(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
OnOvsPortDel default implementation
func (*DefaultOvsMonitorHandler) OnOvsPortUpdate ¶
func (d *DefaultOvsMonitorHandler) OnOvsPortUpdate(monitor *OvsMonitor, uuid string, row *libovsdb.RowUpdate)
OnOvsPortUpdate default implementation
func (*DefaultOvsMonitorHandler) OnOvsUpdate ¶
func (d *DefaultOvsMonitorHandler) OnOvsUpdate(monitor *OvsMonitor, row *libovsdb.RowUpdate)
OnOvsUpdate default implementation
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) Update ¶
func (n Notifier) Update(context interface{}, tableUpdates libovsdb.TableUpdates)
Update OVS notifier tables event
type OvsMonitor ¶
type OvsMonitor struct { common.RWMutex Protocol string Target string OvsClient *OvsClient MonitorHandlers []OvsMonitorHandler // contains filtered or unexported fields }
OvsMonitor describes an OVS client Monitor
func NewOvsMonitor ¶
func NewOvsMonitor(protocol 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(table, column string)
ExcludeColumn excludes the given table/column to be monitored. All columns can be excluded using "*" as column name.
func (*OvsMonitor) IncludeColumn ¶
func (o *OvsMonitor) IncludeColumn(table, column string)
IncludeColumn includes the given column in the set of the monitored column. Columns are excluded and then included in that order. By default all the column are included.
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 { OnConnected(monitor *OvsMonitor) OnDisconnected(monitor *OvsMonitor) 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) OnOvsUpdate(monitor *OvsMonitor, row *libovsdb.RowUpdate) }
OvsMonitorHandler describes an OVS Monitor interface mechanism