broker

package
v2.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2017 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker interface {
	component.Interface
	component.ManagementInterface

	SetNetworkServer(addr, cert, token string)

	HandleUplink(uplink *pb.UplinkMessage) error
	HandleDownlink(downlink *pb.DownlinkMessage) error
	HandleActivation(activation *pb.DeviceActivationRequest) (*pb.DeviceActivationResponse, error)

	ActivateRouter(id string) (<-chan *pb.DownlinkMessage, error)
	DeactivateRouter(id string) error
	ActivateHandlerUplink(id string) (<-chan *pb.DeduplicatedUplinkMessage, error)
	DeactivateHandlerUplink(id string) error
}

func NewBroker

func NewBroker(timeout time.Duration) Broker

type ByFCntUp

type ByFCntUp []*pb_lorawan.Device

ByFCntUp implements sort.Interface for []*pb_lorawan.Device based on FCnt

func (ByFCntUp) Len

func (a ByFCntUp) Len() int

func (ByFCntUp) Less

func (a ByFCntUp) Less(i, j int) bool

func (ByFCntUp) Swap

func (a ByFCntUp) Swap(i, j int)

type ByScore

type ByScore []*pb.DownlinkOption

ByScore is used to sort a list of DownlinkOptions based on Score

func (ByScore) Len

func (a ByScore) Len() int

func (ByScore) Less

func (a ByScore) Less(i, j int) bool

func (ByScore) Swap

func (a ByScore) Swap(i, j int)

type Deduplicator

type Deduplicator interface {
	Deduplicate(key string, value interface{}) []interface{}
}

func NewDeduplicator

func NewDeduplicator(timeout time.Duration) Deduplicator

Jump to

Keyboard shortcuts

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