Documentation ¶
Index ¶
- func IsFunc(fn interface{}) bool
- type Client
- type Handler
- type ListHandler
- func (l *ListHandler) Add(oid string) *ListItem
- func (l *ListHandler) Delete(oid string)
- func (l *ListHandler) Get(oid value.OID) (value.OID, pdu.VariableType, interface{}, error)
- func (l *ListHandler) GetNext(from value.OID, includeFrom bool, to value.OID) (value.OID, pdu.VariableType, interface{}, error)
- type ListItem
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { Net string Address string Timeout time.Duration ReconnectInterval time.Duration NameOID value.OID Name string // contains filtered or unexported fields }
Client defines an agentx client.
type Handler ¶
type Handler interface { Get(value.OID) (value.OID, pdu.VariableType, interface{}, error) GetNext(value.OID, bool, value.OID) (value.OID, pdu.VariableType, interface{}, error) }
Handler defines an interface for a handler of events that might occure during a session.
type ListHandler ¶
type ListHandler struct {
// contains filtered or unexported fields
}
ListHandler is a helper that takes a list of oids and implements a default behaviour for that list.
func (*ListHandler) Add ¶
func (l *ListHandler) Add(oid string) *ListItem
Add adds a list item for the provided oid and returns it.
func (*ListHandler) Delete ¶ added in v1.1.6
func (l *ListHandler) Delete(oid string)
Delete removes specific OID from ListHandler. Author: @shevchenkodenis <https://github.com/shevchenkodenis>
func (*ListHandler) Get ¶
func (l *ListHandler) Get(oid value.OID) (value.OID, pdu.VariableType, interface{}, error)
Get tries to find the provided oid and returns the corresponding value.
type ListItem ¶
type ListItem struct { Type pdu.VariableType Value interface{} }
ListItem defines an item of the list handler.
type Session ¶
type Session struct { Handler Handler // contains filtered or unexported fields }
Session defines an agentx session.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.