relay

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CYCLE = 1 * time.Second
)

Variables

This section is empty.

Functions

func New

func New(cfg Config, log logger.Log) *relay

Types

type Config

type Config struct {
	Rc   int    // push retries
	Name string // worker's name
}

type Relay

type Relay interface {
	Run()
	Stop()
	SendChannel() chan<- *message.Packet // channel should close after Stop by caller
	RecvChannel() <-chan *message.Packet // channel will automatically close after stop
}

Jump to

Keyboard shortcuts

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