Documentation ¶ Index ¶ Constants func New(cfg Config, log logger.Log) *relay type Config type Relay 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 } Source Files ¶ View all Source files relay.go types.go Click to show internal directories. Click to hide internal directories.