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) *
Click to show internal directories.
Click to hide internal directories.