middleware

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: 3 Imported by: 36

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Timeout = 10 * time.Millisecond

Timeout for middleware

Functions

This section is empty.

Types

type Chain

type Chain []interface{}

Chain of middleware

func (Chain) Execute

func (c Chain) Execute(ctx Context, msg interface{}) error

Execute the chain

type Connect

type Connect interface {
	HandleConnect(Context, *types.ConnectMessage) error
}

Connect middleware

type Context

type Context interface {
	Set(k, v interface{})
	Get(k interface{}) interface{}
}

Context for middleware

func NewContext

func NewContext() Context

NewContext returns a new middleware context

type Disconnect

type Disconnect interface {
	HandleDisconnect(Context, *types.DisconnectMessage) error
}

Disconnect middleware

type Downlink interface {
	HandleDownlink(Context, *types.DownlinkMessage) error
}

Downlink middleware

type Status

type Status interface {
	HandleStatus(Context, *types.StatusMessage) error
}

Status middleware

type Uplink interface {
	HandleUplink(Context, *types.UplinkMessage) error
}

Uplink middleware

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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