snmptrap

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// The host:port address of the SNMP trap server
	Addr string
	// SNMP Community
	Community string
	// Retries count for traps
	Retries uint
}

type Data

type Data struct {
	Oid   string `yaml:"oid,omitempty" json:"oid,omitempty"`
	Type  string `yaml:"type,omitempty" json:"type,omitempty"`
	Value string `yaml:"value,omitempty" json:"value,omitempty"`
}

type Options

type Options struct {
	TrapOid  string `yaml:"trap-oid,omitempty" json:"trap-oid,omitempty"`
	DataList []Data `yaml:"data-list,omitempty" json:"data-list,omitempty"`
}

type Service

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

func NewService

func NewService(c Config) *Service

func (*Service) Close

func (s *Service) Close() error

func (*Service) Open

func (s *Service) Open() error

func (*Service) Trap

func (s *Service) Trap(trapOid string, dataList []Data) error

Jump to

Keyboard shortcuts

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