Documentation ¶
Index ¶
- func NewBackendMongoDB(client *mongo.Client, resultExpire int64, options ...options.Option) backend.Backend
- func SetDatabaseName(databaseName string) options.Option
- func SetTableGroupName(tableGroupName string) options.Option
- func SetTableTaskName(tableTaskName string) options.Option
- type BackendMongoDB
- func (b *BackendMongoDB) GetStatus(taskID string) (*task.Status, error)
- func (b *BackendMongoDB) GroupCompleted(groupID string) (bool, error)
- func (b *BackendMongoDB) GroupTakeOver(groupID string, name string, taskIDs ...string) error
- func (b *BackendMongoDB) GroupTaskStatus(groupID string) ([]*task.Status, error)
- func (b *BackendMongoDB) ResetGroup(groupIDs ...string) error
- func (b *BackendMongoDB) ResetTask(taskIDs ...string) error
- func (b *BackendMongoDB) SetResultExpire(expire int64)
- func (b *BackendMongoDB) SetStateFailure(signature *task.Signature, err string) error
- func (b *BackendMongoDB) SetStatePending(signature *task.Signature) error
- func (b *BackendMongoDB) SetStateReceived(signature *task.Signature) error
- func (b *BackendMongoDB) SetStateRetry(signature *task.Signature) error
- func (b *BackendMongoDB) SetStateStarted(signature *task.Signature) error
- func (b *BackendMongoDB) SetStateSuccess(signature *task.Signature, results []*task.Result) error
- func (b *BackendMongoDB) TriggerCompleted(groupID string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBackendMongoDB ¶
func SetDatabaseName ¶
func SetTableGroupName ¶
func SetTableTaskName ¶
Types ¶
type BackendMongoDB ¶
type BackendMongoDB struct {
// contains filtered or unexported fields
}
func (*BackendMongoDB) GetStatus ¶
func (b *BackendMongoDB) GetStatus(taskID string) (*task.Status, error)
func (*BackendMongoDB) GroupCompleted ¶
func (b *BackendMongoDB) GroupCompleted(groupID string) (bool, error)
func (*BackendMongoDB) GroupTakeOver ¶
func (b *BackendMongoDB) GroupTakeOver(groupID string, name string, taskIDs ...string) error
func (*BackendMongoDB) GroupTaskStatus ¶
func (b *BackendMongoDB) GroupTaskStatus(groupID string) ([]*task.Status, error)
func (*BackendMongoDB) ResetGroup ¶
func (b *BackendMongoDB) ResetGroup(groupIDs ...string) error
func (*BackendMongoDB) ResetTask ¶
func (b *BackendMongoDB) ResetTask(taskIDs ...string) error
func (*BackendMongoDB) SetResultExpire ¶
func (b *BackendMongoDB) SetResultExpire(expire int64)
SetResultExpire 设置结果超时时间
func (*BackendMongoDB) SetStateFailure ¶
func (b *BackendMongoDB) SetStateFailure(signature *task.Signature, err string) error
func (*BackendMongoDB) SetStatePending ¶
func (b *BackendMongoDB) SetStatePending(signature *task.Signature) error
func (*BackendMongoDB) SetStateReceived ¶
func (b *BackendMongoDB) SetStateReceived(signature *task.Signature) error
func (*BackendMongoDB) SetStateRetry ¶
func (b *BackendMongoDB) SetStateRetry(signature *task.Signature) error
func (*BackendMongoDB) SetStateStarted ¶
func (b *BackendMongoDB) SetStateStarted(signature *task.Signature) error
func (*BackendMongoDB) SetStateSuccess ¶
func (*BackendMongoDB) TriggerCompleted ¶
func (b *BackendMongoDB) TriggerCompleted(groupID string) (bool, error)
Click to show internal directories.
Click to hide internal directories.