Documentation
¶
Index ¶
- type GoSNMPWrapper
- type MockSNMPScraper
- func (m *MockSNMPScraper) CallGet() []string
- func (m *MockSNMPScraper) CallWalk() []string
- func (m *MockSNMPScraper) Close() error
- func (m *MockSNMPScraper) Connect() error
- func (m *MockSNMPScraper) Get(oids []string) (*gosnmp.SnmpPacket, error)
- func (m *MockSNMPScraper) SetOptions(...func(*gosnmp.GoSNMP))
- func (m *MockSNMPScraper) WalkAll(baseOID string) ([]gosnmp.SnmpPDU, error)
- type SNMPScraper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoSNMPWrapper ¶
type GoSNMPWrapper struct {
// contains filtered or unexported fields
}
func (*GoSNMPWrapper) Close ¶
func (g *GoSNMPWrapper) Close() error
func (*GoSNMPWrapper) Connect ¶
func (g *GoSNMPWrapper) Connect() error
func (*GoSNMPWrapper) Get ¶
func (g *GoSNMPWrapper) Get(oids []string) (*gosnmp.SnmpPacket, error)
func (*GoSNMPWrapper) SetOptions ¶
func (g *GoSNMPWrapper) SetOptions(fns ...func(*gosnmp.GoSNMP))
type MockSNMPScraper ¶ added in v0.31.0
type MockSNMPScraper struct {
GetResponses map[string]gosnmp.SnmpPDU
WalkResponses map[string][]gosnmp.SnmpPDU
ConnectError error
CloseError error
// contains filtered or unexported fields
}
func NewMockSNMPScraper ¶
func (*MockSNMPScraper) CallGet ¶ added in v0.31.0
func (m *MockSNMPScraper) CallGet() []string
func (*MockSNMPScraper) CallWalk ¶ added in v0.31.0
func (m *MockSNMPScraper) CallWalk() []string
func (*MockSNMPScraper) Close ¶ added in v0.31.0
func (m *MockSNMPScraper) Close() error
func (*MockSNMPScraper) Connect ¶ added in v0.31.0
func (m *MockSNMPScraper) Connect() error
func (*MockSNMPScraper) Get ¶ added in v0.31.0
func (m *MockSNMPScraper) Get(oids []string) (*gosnmp.SnmpPacket, error)
func (*MockSNMPScraper) SetOptions ¶ added in v0.31.0
func (m *MockSNMPScraper) SetOptions(...func(*gosnmp.GoSNMP))
Click to show internal directories.
Click to hide internal directories.