Documentation
¶
Index ¶
- Constants
- func NowTimeStamp() string
- func RandQueue(queueNames []string) []string
- func Register(task Task, option Doter)
- func RegisterByName(taskName string, task Task, option Doter)
- func Unique(in []string) []string
- type ChartData
- type ChartSeriesData
- type Client
- type Dot
- type DotCache
- type DotData
- type DotDataOption
- type Doter
- type GoDot
- type Queue
- type QueueJob
- type RedisCache
- func (r *RedisCache) BlockRPop(ctx context.Context, queue ...string) (string, error)
- func (r *RedisCache) BulkLPush(ctx context.Context, key string, values []interface{})
- func (r *RedisCache) HGet(ctx context.Context, hash, key string) (string, error)
- func (r *RedisCache) HGetAll(ctx context.Context, hash string) (map[string]string, error)
- func (r *RedisCache) HIncrBy(ctx context.Context, hash, key string, incValue int64) error
- func (r *RedisCache) HSet(ctx context.Context, hash string, values ...interface{}) error
- func (r *RedisCache) LIndex(ctx context.Context, key string, index int64) (string, error)
- func (r *RedisCache) LLen(ctx context.Context, key string) (int64, error)
- func (r *RedisCache) LPop(ctx context.Context, key string) (string, error)
- func (r *RedisCache) LPush(ctx context.Context, key string, values interface{})
- func (r *RedisCache) LRange(ctx context.Context, key string, start, stop int64) ([]string, error)
- func (r *RedisCache) LTrim(ctx context.Context, key string, start, stop int64) (string, error)
- func (r *RedisCache) RPop(ctx context.Context, key string) (string, error)
- func (r *RedisCache) RPush(ctx context.Context, key string, values interface{})
- func (r *RedisCache) TimeAdd(ctx context.Context, time int64, key string, values interface{})
- func (r *RedisCache) TimeQuery(ctx context.Context, queue string) ([]string, error)
- func (r *RedisCache) TimeRem(ctx context.Context, queue, job string) (int64, error)
- type ScheduleJob
- type Stats
- type Task
Constants ¶
View Source
const ( DefaultMaxRetry = 25 LAYOUT = "2006-01-02 15:04:05 UTC" FetchTimeout = 2 * time.Second PollInterval = 2 )
View Source
const CALCKEY = "godot:calc:%s"
View Source
const Dead = "dead"
View Source
const DefaultDoter = "default_dot"
View Source
const Jobs = "jobs"
View Source
const MSTASQKEY = "godot:mstats:%s"
View Source
const MaxMinuteSpan = 60 * 24 * 7 //seconds per 7 days
View Source
const MaxSecondSpan = 60 * 60 * 24 //seconds per 7 days
View Source
const RetryQueue = "retry"
View Source
const STASQKEY = "godot:stats:%s"
View Source
const ScheduleQueue = "schedule"
View Source
const Success = "success"
Variables ¶
This section is empty.
Functions ¶
func NowTimeStamp ¶
func NowTimeStamp() string
func RegisterByName ¶
Types ¶
type ChartSeriesData ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewGoDotCli ¶
func NewGoDotCli(client *redis.Client) *Client
type DotCache ¶
type DotCache interface { RPop(ctx context.Context, key string) (string, error) LPop(ctx context.Context, key string) (string, error) LTrim(ctx context.Context, key string, start, stop int64) (string, error) LIndex(ctx context.Context, key string, index int64) (string, error) LRange(ctx context.Context, key string, start, stop int64) ([]string, error) LPush(ctx context.Context, key string, values interface{}) RPush(ctx context.Context, key string, values interface{}) BulkLPush(ctx context.Context, key string, values []interface{}) BlockRPop(ctx context.Context, queue ...string) (string, error) TimeAdd(ctx context.Context, time int64, key string, values interface{}) TimeQuery(ctx context.Context, queue string) ([]string, error) TimeRem(ctx context.Context, queue, job string) (int64, error) HGet(ctx context.Context, hash, key string) (string, error) HGetAll(ctx context.Context, hash string) (map[string]string, error) HSet(ctx context.Context, hash string, value ...interface{}) error HIncrBy(ctx context.Context, hash, key string, incValue int64) error LLen(ctx context.Context, key string) (int64, error) }
func NewRedisCache ¶
func NewRedisCache(client *redis.Client) DotCache
type DotData ¶
type DotData struct { Queue string `json:"queue,omitempty"` Class string `json:"class"` Args []interface{} `json:"args"` Jid string `json:"jid"` EnqueuedAt string `json:"enqueued_at"` DotDataOption }
func NewDotData ¶
func (*DotData) SetRetryInfo ¶
func (d *DotData) SetRetryInfo()
type DotDataOption ¶
type QueueJob ¶
type QueueJob struct {
// contains filtered or unexported fields
}
func NewQueueJob ¶
func (*QueueJob) QueueNames ¶
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
func (*RedisCache) BulkLPush ¶
func (r *RedisCache) BulkLPush(ctx context.Context, key string, values []interface{})
func (*RedisCache) HSet ¶
func (r *RedisCache) HSet(ctx context.Context, hash string, values ...interface{}) error
func (*RedisCache) LPush ¶
func (r *RedisCache) LPush(ctx context.Context, key string, values interface{})
func (*RedisCache) RPush ¶
func (r *RedisCache) RPush(ctx context.Context, key string, values interface{})
func (*RedisCache) TimeAdd ¶
func (r *RedisCache) TimeAdd(ctx context.Context, time int64, key string, values interface{})
type ScheduleJob ¶
type ScheduleJob struct {
// contains filtered or unexported fields
}
func NewScheduleJob ¶
func (*ScheduleJob) FetchJob ¶
func (s *ScheduleJob) FetchJob(ctx context.Context)
func (*ScheduleJob) Stop ¶
func (s *ScheduleJob) Stop()
Click to show internal directories.
Click to hide internal directories.