/usr/share/gocode/src/github.com/socketplane/libovsdb/rpc.go is in golang-github-socketplane-libovsdb-dev 0.1+git20160503.9.d4b9e7a53548-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | package libovsdb
// NewGetSchemaArgs creates a new set of arguments for a get_schemas RPC
func NewGetSchemaArgs(schema string) []interface{} {
return []interface{}{schema}
}
// NewTransactArgs creates a new set of arguments for a transact RPC
func NewTransactArgs(database string, operations ...Operation) []interface{} {
dbSlice := make([]interface{}, 1)
dbSlice[0] = database
opsSlice := make([]interface{}, len(operations))
for i, d := range operations {
opsSlice[i] = d
}
ops := append(dbSlice, opsSlice...)
return ops
}
// NewCancelArgs creates a new set of arguments for a cancel RPC
func NewCancelArgs(id interface{}) []interface{} {
return []interface{}{id}
}
// NewMonitorArgs creates a new set of arguments for a monitor RPC
func NewMonitorArgs(database string, value interface{}, requests map[string]MonitorRequest) []interface{} {
return []interface{}{database, value, requests}
}
// NewMonitorCancelArgs creates a new set of arguments for a monitor_cancel RPC
func NewMonitorCancelArgs(value interface{}) []interface{} {
return []interface{}{value}
}
// NewLockArgs creates a new set of arguments for a lock, steal or unlock RPC
func NewLockArgs(id interface{}) []interface{} {
return []interface{}{id}
}
|