Documentation ¶
Overview ¶
Package server provides an alpha-quality implementation of an OVSDB Server
It is designed only to be used for testing the functionality of the client library such that assertions can be made on the cache that backs the client's monitor or the server
Index ¶
- type OvsdbServer
- func (o *OvsdbServer) Cancel(client *rpc2.Client, args []interface{}, reply *[]interface{}) error
- func (o *OvsdbServer) Close()
- func (o *OvsdbServer) DoEcho(ok bool)
- func (o *OvsdbServer) Echo(client *rpc2.Client, args []interface{}, reply *[]interface{}) error
- func (o *OvsdbServer) GetSchema(client *rpc2.Client, args []interface{}, reply *ovsdb.DatabaseSchema) error
- func (o *OvsdbServer) ListDatabases(client *rpc2.Client, args []interface{}, reply *[]string) error
- func (o *OvsdbServer) Lock(client *rpc2.Client, args []interface{}, reply *[]interface{}) error
- func (o *OvsdbServer) Monitor(client *rpc2.Client, args []json.RawMessage, reply *ovsdb.TableUpdates) error
- func (o *OvsdbServer) MonitorCancel(client *rpc2.Client, args []interface{}, reply *[]interface{}) error
- func (o *OvsdbServer) MonitorCond(client *rpc2.Client, args []json.RawMessage, reply *ovsdb.TableUpdates2) error
- func (o *OvsdbServer) MonitorCondSince(client *rpc2.Client, args []json.RawMessage, ...) error
- func (o *OvsdbServer) OnConnect(f func(*rpc2.Client))
- func (o *OvsdbServer) OnDisConnect(f func(*rpc2.Client))
- func (o *OvsdbServer) Ready() bool
- func (o *OvsdbServer) Serve(protocol string, path string) error
- func (o *OvsdbServer) Steal(client *rpc2.Client, args []interface{}, reply *[]interface{}) error
- func (o *OvsdbServer) Transact(client *rpc2.Client, args []json.RawMessage, reply *[]*ovsdb.OperationResult) error
- func (o *OvsdbServer) Unlock(client *rpc2.Client, args []interface{}, reply *[]interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OvsdbServer ¶
type OvsdbServer struct {
// contains filtered or unexported fields
}
OvsdbServer is an ovsdb server
func NewOvsdbServer ¶
func NewOvsdbServer(db database.Database, models ...model.DatabaseModel) (*OvsdbServer, error)
NewOvsdbServer returns a new OvsdbServer
func (*OvsdbServer) Cancel ¶
func (o *OvsdbServer) Cancel(client *rpc2.Client, args []interface{}, reply *[]interface{}) error
Cancel cancels the last transaction
func (*OvsdbServer) DoEcho ¶ added in v0.7.0
func (o *OvsdbServer) DoEcho(ok bool)
func (*OvsdbServer) Echo ¶
func (o *OvsdbServer) Echo(client *rpc2.Client, args []interface{}, reply *[]interface{}) error
Echo tests the liveness of the connection
func (*OvsdbServer) GetSchema ¶
func (o *OvsdbServer) GetSchema(client *rpc2.Client, args []interface{}, reply *ovsdb.DatabaseSchema, ) error
func (*OvsdbServer) ListDatabases ¶
func (o *OvsdbServer) ListDatabases(client *rpc2.Client, args []interface{}, reply *[]string) error
ListDatabases lists the databases in the current system
func (*OvsdbServer) Lock ¶
func (o *OvsdbServer) Lock(client *rpc2.Client, args []interface{}, reply *[]interface{}) error
Lock acquires a lock on a table for a the client
func (*OvsdbServer) Monitor ¶
func (o *OvsdbServer) Monitor(client *rpc2.Client, args []json.RawMessage, reply *ovsdb.TableUpdates) error
Monitor monitors a given database table and provides updates to the client via an RPC callback
func (*OvsdbServer) MonitorCancel ¶
func (o *OvsdbServer) MonitorCancel(client *rpc2.Client, args []interface{}, reply *[]interface{}) error
MonitorCancel cancels a monitor on a given table
func (*OvsdbServer) MonitorCond ¶ added in v0.7.0
func (o *OvsdbServer) MonitorCond(client *rpc2.Client, args []json.RawMessage, reply *ovsdb.TableUpdates2) error
MonitorCond monitors a given database table and provides updates to the client via an RPC callback
func (*OvsdbServer) MonitorCondSince ¶ added in v0.7.0
func (o *OvsdbServer) MonitorCondSince(client *rpc2.Client, args []json.RawMessage, reply *ovsdb.MonitorCondSinceReply) error
MonitorCondSince monitors a given database table and provides updates to the client via an RPC callback
func (*OvsdbServer) OnConnect ¶ added in v0.7.0
func (o *OvsdbServer) OnConnect(f func(*rpc2.Client))
OnConnect registers a function to run when a client connects.
func (*OvsdbServer) OnDisConnect ¶ added in v0.7.0
func (o *OvsdbServer) OnDisConnect(f func(*rpc2.Client))
OnDisConnect registers a function to run when a client disconnects.
func (*OvsdbServer) Ready ¶
func (o *OvsdbServer) Ready() bool
Ready returns true if a server is ready to handle connections
func (*OvsdbServer) Serve ¶
func (o *OvsdbServer) Serve(protocol string, path string) error
Serve starts the OVSDB server on the given path and protocol
func (*OvsdbServer) Steal ¶
func (o *OvsdbServer) Steal(client *rpc2.Client, args []interface{}, reply *[]interface{}) error
Steal steals a lock for a client
func (*OvsdbServer) Transact ¶
func (o *OvsdbServer) Transact(client *rpc2.Client, args []json.RawMessage, reply *[]*ovsdb.OperationResult) error
Transact issues a new database transaction and returns the results