Documentation
¶
Index ¶
- Variables
- func NewBackendRedis(client redis.UniversalClient, resultExpire int64) backend.Backend
- type BackendRedis
- func (b *BackendRedis) GetStatus(taskID string) (*task.Status, error)
- func (b *BackendRedis) GroupCompleted(groupID string) (bool, error)
- func (b *BackendRedis) GroupTakeOver(groupID string, name string, taskIDs ...string) error
- func (b *BackendRedis) GroupTaskStatus(groupID string) ([]*task.Status, error)
- func (b *BackendRedis) ResetGroup(groupIDs ...string) error
- func (b *BackendRedis) ResetTask(taskIDs ...string) error
- func (b *BackendRedis) SetResultExpire(expire int64)
- func (b *BackendRedis) SetStateFailure(signature *task.Signature, err string) error
- func (b *BackendRedis) SetStatePending(signature *task.Signature) error
- func (b *BackendRedis) SetStateReceived(signature *task.Signature) error
- func (b *BackendRedis) SetStateRetry(signature *task.Signature) error
- func (b *BackendRedis) SetStateStarted(signature *task.Signature) error
- func (b *BackendRedis) SetStateSuccess(signature *task.Signature, results []*task.Result) error
- func (b *BackendRedis) TriggerCompleted(groupID string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrType = errors.New("err type")
Functions ¶
func NewBackendRedis ¶
Types ¶
type BackendRedis ¶
type BackendRedis struct {
// contains filtered or unexported fields
}
func (*BackendRedis) GetStatus ¶
func (b *BackendRedis) GetStatus(taskID string) (*task.Status, error)
func (*BackendRedis) GroupCompleted ¶
func (b *BackendRedis) GroupCompleted(groupID string) (bool, error)
func (*BackendRedis) GroupTakeOver ¶
func (b *BackendRedis) GroupTakeOver(groupID string, name string, taskIDs ...string) error
func (*BackendRedis) GroupTaskStatus ¶
func (b *BackendRedis) GroupTaskStatus(groupID string) ([]*task.Status, error)
func (*BackendRedis) ResetGroup ¶
func (b *BackendRedis) ResetGroup(groupIDs ...string) error
func (*BackendRedis) ResetTask ¶
func (b *BackendRedis) ResetTask(taskIDs ...string) error
func (*BackendRedis) SetResultExpire ¶
func (b *BackendRedis) SetResultExpire(expire int64)
SetResultExpire 设置结果超时时间
func (*BackendRedis) SetStateFailure ¶
func (b *BackendRedis) SetStateFailure(signature *task.Signature, err string) error
func (*BackendRedis) SetStatePending ¶
func (b *BackendRedis) SetStatePending(signature *task.Signature) error
func (*BackendRedis) SetStateReceived ¶
func (b *BackendRedis) SetStateReceived(signature *task.Signature) error
func (*BackendRedis) SetStateRetry ¶
func (b *BackendRedis) SetStateRetry(signature *task.Signature) error
func (*BackendRedis) SetStateStarted ¶
func (b *BackendRedis) SetStateStarted(signature *task.Signature) error
func (*BackendRedis) SetStateSuccess ¶
func (*BackendRedis) TriggerCompleted ¶
func (b *BackendRedis) TriggerCompleted(groupID string) (bool, error)
Click to show internal directories.
Click to hide internal directories.