blacklist

package
v2.3.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2018 License: MIT Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBlacklistedID = errors.New("blacklist: Gateway ID is blacklisted")
	ErrBlacklistedIP = errors.New("blacklist: Gateway IP is blacklisted")
)

Blacklist errors

Functions

This section is empty.

Types

type Blacklist

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

Blacklist middleware

func NewBlacklist

func NewBlacklist(lists ...string) (b *Blacklist, err error)

NewBlacklist returns a middleware that filters traffic from blacklisted gateways

func (*Blacklist) Close

func (b *Blacklist) Close()

Close the blacklist watcher

func (*Blacklist) FetchRemotes

func (b *Blacklist) FetchRemotes() error

FetchRemotes fetches remote blacklists

func (*Blacklist) HandleStatus

func (b *Blacklist) HandleStatus(ctx middleware.Context, msg *types.StatusMessage) error

HandleStatus blocks status messages from blacklisted gateways

func (b *Blacklist) HandleUplink(_ middleware.Context, msg *types.UplinkMessage) error

HandleUplink blocks uplink messages from blacklisted gateways

Jump to

Keyboard shortcuts

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