worker

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Connect = iota
	Disconnect
	Terminate
	Logon
	Logoff
)

Commands to a worker

Variables

This section is empty.

Functions

This section is empty.

Types

type IF

type IF interface {
	ID() int
	Label() string
	Run(wg *sync.WaitGroup)
	Command(int)
	Subscribe(int, string) *Subscription
	UnSubscribe(int)
	Subscriptions() []*Subscription
}

IF Interface

type Subscription

type Subscription struct {
	ID      int              `json:"id,omitempty"`
	Type    string           `json:"type,omitempty"`
	Label   string           `json:"label,omitempty"`
	Channel chan interface{} `json:"-"`
	Next    *Subscription    `json:"-"`
}

Subscription to a message on a channel

func NewSubscription

func NewSubscription(sID int, sType string, label string) *Subscription

NewSubscription create a new subscription

type Workers

type Workers []interface{}

Workers object

Jump to

Keyboard shortcuts

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