Documentation ¶
Index ¶
- func NewMgr(pCtx context.Context, work *types.Work) types.LocalMgr
- type Mgr
- func (m *Mgr) ExecuteTask(req *types.LocalTaskExecuteRequest, globalWork *types.Work, ...) (*types.LocalTaskExecuteResult, error)
- func (m *Mgr) GetPumpCache() (*analyser.FileCache, *analyser.RootCache)
- func (m *Mgr) Init()
- func (m *Mgr) LockSlots(usage dcSDK.JobUsage, weight int32) bool
- func (m *Mgr) Slots() (int, int)
- func (m *Mgr) Start()
- func (m *Mgr) TryLockSlots(usage dcSDK.JobUsage, weight int32) (bool, error)
- func (m *Mgr) UnlockSlots(usage dcSDK.JobUsage, weight int32)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mgr ¶
type Mgr struct {
// contains filtered or unexported fields
}
Mgr describe the local manager provides the local actions handler for work
func (*Mgr) ExecuteTask ¶
func (m *Mgr) ExecuteTask( req *types.LocalTaskExecuteRequest, globalWork *types.Work, canUseLocalIdleResource bool, f types.CallbackCheckLocalResource) (*types.LocalTaskExecuteResult, error)
ExecuteTask 若是task command本身运行失败, 不作为execute失败, 将结果放在result中返回即可 只有筹备执行的过程中失败, 才作为execute失败
func (*Mgr) GetPumpCache ¶
GetPumpCache get pump cache in work
func (*Mgr) TryLockSlots ¶
TryLockSlots try lock a local slot
Click to show internal directories.
Click to hide internal directories.