Documentation ¶
Index ¶
- func NewBackendSQLDB(db *sql.DB, resultExpire int64, dbType string, config *gorm.Config) backend.Backend
- type BackendSQLDB
- func (b *BackendSQLDB) GetStatus(taskID string) (*task.Status, error)
- func (b *BackendSQLDB) GroupCompleted(groupID string) (bool, error)
- func (b *BackendSQLDB) GroupTakeOver(groupID string, name string, taskIDs ...string) error
- func (b *BackendSQLDB) GroupTaskStatus(groupID string) ([]*task.Status, error)
- func (b *BackendSQLDB) ResetGroup(groupIDs ...string) error
- func (b *BackendSQLDB) ResetTask(taskIDs ...string) error
- func (b *BackendSQLDB) SetResultExpire(expire int64)
- func (b *BackendSQLDB) SetStateFailure(signature *task.Signature, err string) error
- func (b *BackendSQLDB) SetStatePending(signature *task.Signature) error
- func (b *BackendSQLDB) SetStateReceived(signature *task.Signature) error
- func (b *BackendSQLDB) SetStateRetry(t *task.Signature) error
- func (b *BackendSQLDB) SetStateStarted(signature *task.Signature) error
- func (b *BackendSQLDB) SetStateSuccess(signature *task.Signature, results []*task.Result) error
- func (b *BackendSQLDB) TriggerCompleted(groupID string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BackendSQLDB ¶
type BackendSQLDB struct {
// contains filtered or unexported fields
}
BackendSQLDB 支持mysql&pgsql
func (*BackendSQLDB) GetStatus ¶
func (b *BackendSQLDB) GetStatus(taskID string) (*task.Status, error)
func (*BackendSQLDB) GroupCompleted ¶
func (b *BackendSQLDB) GroupCompleted(groupID string) (bool, error)
func (*BackendSQLDB) GroupTakeOver ¶
func (b *BackendSQLDB) GroupTakeOver(groupID string, name string, taskIDs ...string) error
func (*BackendSQLDB) GroupTaskStatus ¶
func (b *BackendSQLDB) GroupTaskStatus(groupID string) ([]*task.Status, error)
func (*BackendSQLDB) ResetGroup ¶
func (b *BackendSQLDB) ResetGroup(groupIDs ...string) error
func (*BackendSQLDB) ResetTask ¶
func (b *BackendSQLDB) ResetTask(taskIDs ...string) error
func (*BackendSQLDB) SetResultExpire ¶
func (b *BackendSQLDB) SetResultExpire(expire int64)
SetResultExpire 设置结果超时时间
func (*BackendSQLDB) SetStateFailure ¶
func (b *BackendSQLDB) SetStateFailure(signature *task.Signature, err string) error
func (*BackendSQLDB) SetStatePending ¶
func (b *BackendSQLDB) SetStatePending(signature *task.Signature) error
func (*BackendSQLDB) SetStateReceived ¶
func (b *BackendSQLDB) SetStateReceived(signature *task.Signature) error
func (*BackendSQLDB) SetStateRetry ¶
func (b *BackendSQLDB) SetStateRetry(t *task.Signature) error
func (*BackendSQLDB) SetStateStarted ¶
func (b *BackendSQLDB) SetStateStarted(signature *task.Signature) error
func (*BackendSQLDB) SetStateSuccess ¶
func (*BackendSQLDB) TriggerCompleted ¶
func (b *BackendSQLDB) TriggerCompleted(groupID string) (bool, error)
Click to show internal directories.
Click to hide internal directories.