workers

package
v0.0.0-...-4cabc89 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2015 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	HEARTBEAT_LIVENESS = 4                        //  3-5 is reasonable
	HEARTBEAT_INTERVAL = 1000 * time.Millisecond  //  msecs
	INTERVAL_INIT      = 1000 * time.Millisecond  //  Initial reconnect
	INTERVAL_MAX       = 32000 * time.Millisecond //  After exponential backoff
	BTASK_TIMEOUT      = 10 * time.Second

	PPP_READY     = "\001" //  Signals worker is ready
	PPP_HEARTBEAT = "\002" //  Signals worker heartbeat

	//cmd
	COMMAND_GET      = "GET"
	COMMAND_SET      = "SET"
	COMMAND_DEL      = "DEL"
	COMMAND_PUSH     = "PUSH"
	COMMAND_TASK     = "TASK"
	COMMAND_BTASK    = "BTASK"    //阻塞任务
	COMMAND_COMPLETE = "COMPLETE" //完成阻塞任务
	COMMAND_POP      = "POP"
	COMMAND_BPOP     = "BPOP"
	COMMAND_SCHEDULE = "SCHEDULE" //定时任务
	COMMAND_TIMING   = "TIMING"   //定时触发

	//response
	RESPONSE_OK      = "OK"
	RESPONSE_ERROR   = "ERROR"
	RESPONSE_NIL     = "NIL"
	RESPONSE_UNKNOWN = "UNKNOWN"
)

Variables

View Source
var (
	ErrNil = errors.New(RESPONSE_NIL)
)

config var

View Source
var (
	Redis *zredis.ZRedis
)

Functions

This section is empty.

Types

type LocalStorage

type LocalStorage struct {
	// contains filtered or unexported fields
}

func (*LocalStorage) Del

func (ls *LocalStorage) Del() (err error)

{{{ func (ls *LocalStorage) Del() error *

func (*LocalStorage) Get

func (ls *LocalStorage) Get() (r []string, err error)

{{{ func (ls *LocalStorage) Get() (r []string, err error) *

func (*LocalStorage) Schedule

func (ls *LocalStorage) Schedule() (err error)

{{{ func (ls *LocalStorage) Schedule() (err error) *

func (*LocalStorage) Set

func (ls *LocalStorage) Set() (err error)

{{{ func (ls *LocalStorage) Set() (err error) *

func (*LocalStorage) Timing

func (ls *LocalStorage) Timing() (r []string, err error)

{{{ func (ls *LocalStorage) Timing() (r []string, err error) *

type Node

type Node struct {
	// contains filtered or unexported fields
}

type OmqWorker

type OmqWorker struct {
	ogo.Worker
}

func (*OmqWorker) Main

func (w *OmqWorker) Main() error

type StorageOption

type StorageOption struct {
	Type  string
	Db    string
	Table string //当Type为mysql/oracle有用
	Host  string
	Port  string
	Pwd   string
}

Jump to

Keyboard shortcuts

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