intfmapper

package
v0.0.0-...-8992419 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InterfaceIDByName

type InterfaceIDByName map[string]uint16

InterfaceIDByName maps interface names to IDs

type InterfaceNameByID

type InterfaceNameByID map[uint16]string

InterfaceNameByID maps IDs to interface names

type IntfMapperInterface

type IntfMapperInterface interface {
	GetInterfaceIDByName(agent string) InterfaceIDByName
	GetInterfaceNameByID(agent string) InterfaceNameByID
}

type Mapper

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

Mapper is a service that maps agents interface IDs to names

func New

func New(agents []config.Agent, renewInterval int64, timeout time.Duration) (*Mapper, error)

New creates a new Mapper and starts workers for all agents that periodicly renew interface mappings

func (*Mapper) GetInterfaceIDByName

func (m *Mapper) GetInterfaceIDByName(agent string) InterfaceIDByName

GetInterfaceIDByName gets the InterfaceIDByName

func (*Mapper) GetInterfaceNameByID

func (m *Mapper) GetInterfaceNameByID(agent string) InterfaceNameByID

GetInterfaceNameByID gets the InterfaceNameByID

Jump to

Keyboard shortcuts

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