rpc

package
v0.0.0-...-308df95 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: BSD-2-Clause, BSD-3-Clause, LGPL-2.1, + 2 more Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgErr

type ArgErr struct {
	Method string
	Farg   interface{}
	Typ    string
	Etyp   string
}

func (*ArgErr) Error

func (e *ArgErr) Error() string

type ArgNErr

type ArgNErr struct {
	Method string
	Len    int
	Elen   int
}

func (*ArgNErr) Error

func (e *ArgNErr) Error() string

type DB

type DB int
const (
	AUTO DB = iota
	RUNNING
	CANDIDATE
	EFFECTIVE
)

type ExecError

type ExecError struct {
	Path []string
	Err  error
}

type ExecErrors

type ExecErrors []*ExecError

func (ExecErrors) Error

func (errs ExecErrors) Error() string

type ExecOutput

type ExecOutput struct {
	Path   []string
	Output string
}

type ExecOutputs

type ExecOutputs []*ExecOutput

func (ExecOutputs) String

func (outs ExecOutputs) String() string

type MethErr

type MethErr struct {
	Name string
}

func (*MethErr) Error

func (e *MethErr) Error() string

type NodeStatus

type NodeStatus int
const (
	UNCHANGED NodeStatus = iota
	CHANGED
	ADDED
	DELETED
)

func (NodeStatus) String

func (s NodeStatus) String() string

type NodeType

type NodeType int
const (
	LEAF NodeType = iota
	LEAF_LIST
	CONTAINER
	LIST
)

func (NodeType) String

func (typ NodeType) String() string

type Request

type Request struct {
	//Op is the method that was called via json rpc
	Method string `json:"method"`
	//Args is a list of arguments to that method
	Args []interface{} `json:"params"`
	//Id is the unique request identifier
	Id int `json:"id"`
}

Request represents an RPC request

type Response

type Response struct {
	//Result is any value returned by the handler
	//The client library uses reflection to ensure it received the appropriate type.
	Result interface{} `json:"result"`
	//Error contains a message describing a problem
	Error interface{} `json:"error"`
	// MgmtErrList contains the NETCONF <rpc-error> element(s).
	MgmtErrList mgmterror.MgmtErrorList `json:"mgmterrorlist"`
	//Id is the unique request identifier
	Id int `json:"id"`
}

Response represents an RPC response.

Result and Error are encoded as 'null' if not present, whereas MgmtErrList is always encoded, even as an empty list.

Jump to

Keyboard shortcuts

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