trap

package
v0.0.0-...-51fd5d7 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidTimestampValue   = errors.New("invalid trap timestamp value")
	ErrInvalidPortValueOID     = errors.New("invalid port value oid")
	ErrInvalidPortValue        = errors.New("invalid trap port value")
	ErrInvalidDescriptionValue = errors.New("invalid trap description value")
	ErrInvalidTimestampOID     = errors.New("invalid timestamp variable")
	ErrInvalidOIDValueOID      = errors.New("invalid oid value oid")
	ErrInvalidAlarmedValue     = errors.New("invalid alarmed value")
	ErrInvalidVariablesLength  = errors.New("invalid trap binding variables length")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	models.TrapListener
	// AmqpConn is the amqp connection.
	AmqpConn *amqp.Conn
	// Logger is the logger.
	Logger *logger.Logger
	// ServiceIdent is the service ident.
	ServiceIdent string
}

type Trap

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

func New

func New(config Config) *Trap

func (*Trap) Close

func (t *Trap) Close()

Close closes the listener, but not the connections passed on the configuration.

func (*Trap) GetId

func (t *Trap) GetId() int32

func (*Trap) Update

func (t *Trap) Update(tl models.TrapListener)

Jump to

Keyboard shortcuts

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