Documentation ¶
Index ¶
- type Dao
- func (d *Dao) AssignTask(c context.Context, task *model.Task) (rows int64, err error)
- func (d *Dao) CheckFlow(c context.Context, rid, flowid int64) (ok bool, err error)
- func (d *Dao) CheckTask(c context.Context, flowid, rid int64) (id int64)
- func (d *Dao) Close()
- func (d *Dao) CreateTask(c context.Context, task *model.Task) error
- func (d *Dao) CreateUnionSet(c context.Context, businessID, flowID int64) (err error)
- func (d *Dao) DeleteUinonSet(c context.Context, businessID, flowID int64) (err error)
- func (d *Dao) FansCount(c context.Context, mid int64) (fans int64, err error)
- func (d *Dao) FlushReport(c context.Context) (data map[string][]byte, err error)
- func (d *Dao) GetTask(c context.Context, id int64) (task *model.Task, err error)
- func (d *Dao) GetWeight(c context.Context, businessID, flowID int64, id int64) (weight int64, err error)
- func (d *Dao) IncresByField(c context.Context, bizid, flowid, uid int64, field string, value int64) (err error)
- func (d *Dao) IncresTaskInOut(c context.Context, bizid, flowid int64, inOrOut string) (err error)
- func (d *Dao) IsConsumerOn(c context.Context, bizid, flowid int, uid int64) (isOn bool, err error)
- func (d *Dao) KickOutConsumer(c context.Context, bizid, flowid, uid int64) (err error)
- func (d *Dao) Ping(c context.Context) error
- func (d *Dao) PushDelayTask(c context.Context, businessID, flowID int64, uid, taskid int64) (err error)
- func (d *Dao) PushPersonalTask(c context.Context, businessID, flowID int64, uid, taskid int64) (err error)
- func (d *Dao) PushPublicTask(c context.Context, tasks ...*model.Task) (err error)
- func (d *Dao) QueryTask(c context.Context, state int8, mtime time.Time, id, limit int64) (tasks []*model.Task, lastid int64, err error)
- func (d *Dao) RangeUinonSet(c context.Context, businessID, flowID int64, start, stop int64) (wis []*model.WeightItem, err error)
- func (d *Dao) ReleaseByConsumer(c context.Context, bizid, flowid, uid int64) (err error)
- func (d *Dao) RemoveDelayTask(c context.Context, businessID, flowID int64, uid, taskid int64) (err error)
- func (d *Dao) RemovePersonalTask(c context.Context, businessID, flowID int64, uid, taskid int64) (err error)
- func (d *Dao) RemovePublicTask(c context.Context, businessID, flowID int64, taskid int64) (err error)
- func (d *Dao) Report(c context.Context, rt *model.Report) (err error)
- func (d *Dao) Resource(c context.Context, rid int64) (res *model.Resource, err error)
- func (d *Dao) RscAdd(c context.Context, opt *model.AddOption) error
- func (d *Dao) RscCancel(c context.Context, opt *model.CancelOption) error
- func (d *Dao) RscState(c context.Context, rid int64) (state int64, err error)
- func (d *Dao) RscUpdate(c context.Context, opt *model.UpdateOption) error
- func (d *Dao) SetTask(c context.Context, task *model.Task) (err error)
- func (d *Dao) SetWeight(c context.Context, businessID, flowID int64, id, weight int64) (err error)
- func (d *Dao) SetWeightDB(c context.Context, taskid, weight int64) (rows int64, err error)
- func (d *Dao) TaskActiveConfigs(c context.Context) (configs []*model.TaskConfig, err error)
- func (d *Dao) TaskActiveConsumer(c context.Context) (consumerCache map[string]map[int64]struct{}, err error)
- func (d *Dao) TaskClear(c context.Context, mtime time.Time, limit int64) (rows int64, err error)
- func (d *Dao) TaskRelease(c context.Context, mtime time.Time) (err error)
- func (d *Dao) TopWeights(c context.Context, businessID, flowID int64, toplen int64) (wis []*model.WeightItem, err error)
- func (d *Dao) UpSpecial(c context.Context, mid int64) (groupids []int64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao dao
func (*Dao) AssignTask ¶
AssignTask .
func (*Dao) CreateTask ¶
CreateTask .
func (*Dao) CreateUnionSet ¶
CreateUnionSet 创建分身集合
func (*Dao) DeleteUinonSet ¶
DeleteUinonSet 清空分身
func (*Dao) FlushReport ¶
FlushReport .
func (*Dao) GetWeight ¶
func (d *Dao) GetWeight(c context.Context, businessID, flowID int64, id int64) (weight int64, err error)
GetWeight get Weight
func (*Dao) IncresByField ¶
func (d *Dao) IncresByField(c context.Context, bizid, flowid, uid int64, field string, value int64) (err error)
IncresByField .
func (*Dao) IncresTaskInOut ¶
IncresTaskInOut 总进审量-出审量
func (*Dao) IsConsumerOn ¶
IsConsumerOn .
func (*Dao) KickOutConsumer ¶
KickOutConsumer 踢出用户
func (*Dao) PushDelayTask ¶
func (d *Dao) PushDelayTask(c context.Context, businessID, flowID int64, uid, taskid int64) (err error)
PushDelayTask 延迟任务队列
func (*Dao) PushPersonalTask ¶
func (d *Dao) PushPersonalTask(c context.Context, businessID, flowID int64, uid, taskid int64) (err error)
PushPersonalTask 放入本人任务池
func (*Dao) PushPublicTask ¶
PushPublicTask 放入实时任务池
func (*Dao) QueryTask ¶
func (d *Dao) QueryTask(c context.Context, state int8, mtime time.Time, id, limit int64) (tasks []*model.Task, lastid int64, err error)
QueryTask .
func (*Dao) RangeUinonSet ¶
func (d *Dao) RangeUinonSet(c context.Context, businessID, flowID int64, start, stop int64) (wis []*model.WeightItem, err error)
RangeUinonSet 批次取出
func (*Dao) ReleaseByConsumer ¶
ReleaseByConsumer .
func (*Dao) RemoveDelayTask ¶
func (d *Dao) RemoveDelayTask(c context.Context, businessID, flowID int64, uid, taskid int64) (err error)
RemoveDelayTask 延迟任务完成
func (*Dao) RemovePersonalTask ¶
func (d *Dao) RemovePersonalTask(c context.Context, businessID, flowID int64, uid, taskid int64) (err error)
RemovePersonalTask 任务延迟或完成
func (*Dao) RemovePublicTask ¶
func (d *Dao) RemovePublicTask(c context.Context, businessID, flowID int64, taskid int64) (err error)
RemovePublicTask 移除
func (*Dao) SetWeightDB ¶
SetWeightDB .
func (*Dao) TaskActiveConfigs ¶
TaskActiveConfigs list config
func (*Dao) TaskActiveConsumer ¶
func (d *Dao) TaskActiveConsumer(c context.Context) (consumerCache map[string]map[int64]struct{}, err error)
TaskActiveConsumer list consumer
func (*Dao) TaskRelease ¶
TaskRelease .
func (*Dao) TopWeights ¶
func (d *Dao) TopWeights(c context.Context, businessID, flowID int64, toplen int64) (wis []*model.WeightItem, err error)
TopWeights .
Source Files ¶
Click to show internal directories.
Click to hide internal directories.