Documentation
¶
Index ¶
- type Snmp
- func (s *Snmp) Get(oid string) (string, error)
- func (s *Snmp) GetMultiple(oids []string) (map[string]string, error)
- func (s *Snmp) MultiSet(toset map[string]interface{}) (map[string]interface{}, error)
- func (s *Snmp) Set(oid string, value interface{}) (interface{}, error)
- func (s *Snmp) SortWalk(oid string) (SortedWalkSlice, error)
- func (s *Snmp) Walk(oid string) (map[string]string, error)
- type SortedWalkSlice
- type WalkResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Snmp ¶
type Snmp struct { Host string Oid string Version string CommStr string Port int Timeout int Retries int }
Snmp is wrapped some convinince SNMP interface for SNMP operation
func (*Snmp) GetMultiple ¶
GetMultiple to get SNMP values by oid slice
func (*Snmp) MultiSet ¶
MultiSet use wsnmp to do multi set
toset := make(map[string]interface{}) toset[oid1]="abc" toset[oid2]=1 ret, err := MultiSet1(toset)
type SortedWalkSlice ¶
type SortedWalkSlice []WalkResult
SortedWalkSlice sorted slice by WalkResult.Oid
func (SortedWalkSlice) Len ¶
func (s SortedWalkSlice) Len() int
func (SortedWalkSlice) Less ¶
func (s SortedWalkSlice) Less(i, j int) bool
func (SortedWalkSlice) Swap ¶
func (s SortedWalkSlice) Swap(i, j int)
type WalkResult ¶
WalkResult to stroe walk result with key-value pair in struct
Click to show internal directories.
Click to hide internal directories.