arp

package
v0.0.0-...-34fa420 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound      = errors.New("not found")
	ErrIfaceNotFound = errors.New("iface not found")
)

Functions

This section is empty.

Types

type Identifier

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

func NewIdentifier

func NewIdentifier() *Identifier

func (*Identifier) Identify

func (i *Identifier) Identify(r *http.Request) (string, error)

func (*Identifier) OnOffline

func (i *Identifier) OnOffline(fn func(id string))

func (*Identifier) Watch

func (i *Identifier) Watch(ctx context.Context, config WatchConfig) error

type Table

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

func NewTable

func NewTable() *Table

func (*Table) Count

func (t *Table) Count() int

func (*Table) FindMACByIP

func (t *Table) FindMACByIP(ip string) (string, error)

func (*Table) OnOffline

func (t *Table) OnOffline(fn func(id string))

func (*Table) Watch

func (t *Table) Watch(ctx context.Context, config WatchConfig) error

type WatchConfig

type WatchConfig struct {
	RouterIP        string
	RouterNetwork   string
	HostIP          string
	NIC             string
	OfflineDeadline time.Duration
	ProbeInterval   time.Duration
	PurgeDeadline   time.Duration
}

Jump to

Keyboard shortcuts

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