command

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StreamTypeRequest   byte = 1
	StreamTypeJob       byte = 2
	StreamTypeHeartbeat byte = 3
)

Stream command type

View Source
const (
	CHeartbeat = "HEARTBEAT"
	CRegister  = "REG"
	CRemove    = "REMOVE"
)

List of available command string

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Name []byte
	Body []byte
	Type byte
}

func Heartbeat

func Heartbeat() *Command

Heartbeat command

func Job

func Job(data []byte) *Command

Job command

func Register

func Register(channel string) *Command

Register command new channel to consume

func Remove

func Remove(channel, id string) *Command

Remove command remove job based on id and channel

func (*Command) Write

func (c *Command) Write(w io.Writer) (int, error)

Jump to

Keyboard shortcuts

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