local

package
v0.0.0-...-6ac6f58 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: Apache-2.0, BSD-3-Clause, MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMgr

func NewMgr(pCtx context.Context, work *types.Work) types.LocalMgr

NewMgr get a new LocalMgr

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,
	withlocalresource bool) (*types.LocalTaskExecuteResult, error)

ExecuteTask 若是task command本身运行失败, 不作为execute失败, 将结果放在result中返回即可 只有筹备执行的过程中失败, 才作为execute失败

func (*Mgr) GetPumpCache

func (m *Mgr) GetPumpCache() (*analyser.FileCache, *analyser.RootCache)

GetPumpCache get pump cache in work

func (*Mgr) Init

func (m *Mgr) Init()

Init do the initialization for local manager

func (*Mgr) LockSlots

func (m *Mgr) LockSlots(usage dcSDK.JobUsage, weight int32) bool

LockSlots lock a local slot

func (*Mgr) Slots

func (m *Mgr) Slots() (int, int)

Slots get current total and occupied slots

func (*Mgr) Start

func (m *Mgr) Start()

Start start resource slots for local manager

func (*Mgr) UnlockSlots

func (m *Mgr) UnlockSlots(usage dcSDK.JobUsage, weight int32)

UnlockSlots unlock a local slot

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL