scraper

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockSNMPScraper

func NewMockSNMPScraper(get map[string]gosnmp.SnmpPDU, walk map[string][]gosnmp.SnmpPDU) *mockSNMPScraper

Types

type GoSNMPWrapper

type GoSNMPWrapper struct {
	// contains filtered or unexported fields
}

func NewGoSNMP

func NewGoSNMP(logger log.Logger, target, srcAddress string, debug bool) (*GoSNMPWrapper, error)

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) (results *gosnmp.SnmpPacket, err error)

func (*GoSNMPWrapper) SetOptions

func (g *GoSNMPWrapper) SetOptions(fns ...func(*gosnmp.GoSNMP))

func (*GoSNMPWrapper) WalkAll

func (g *GoSNMPWrapper) WalkAll(oid string) (results []gosnmp.SnmpPDU, err error)

type SNMPScraper

type SNMPScraper interface {
	Get([]string) (*gosnmp.SnmpPacket, error)
	WalkAll(string) ([]gosnmp.SnmpPDU, error)
	Connect() error
	Close() error
	SetOptions(...func(*gosnmp.GoSNMP))
}

Jump to

Keyboard shortcuts

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