resource

package
v0.4.16 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2018 License: GPL-3.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scheduler added in v0.4.1

type Scheduler struct {
	OS *hardware.Hardware
	// contains filtered or unexported fields
}

func NewScheduler added in v0.4.1

func NewScheduler(ctx context.Context, hardware *hardware.Hardware) *Scheduler

func (*Scheduler) AskPlanIDByTaskID added in v0.4.1

func (m *Scheduler) AskPlanIDByTaskID(taskID string) (string, error)

TODO: rework needed — looks like it should not be here

func (*Scheduler) Consume added in v0.4.1

func (m *Scheduler) Consume(askPlan *sonm.AskPlan) error

Consume tries to consume the specified resource usage from the pool.

Does nothing on error.

func (*Scheduler) ConsumeTask added in v0.4.1

func (m *Scheduler) ConsumeTask(askPlanID string, taskID string, resources *sonm.AskPlanResources) error

func (*Scheduler) DebugDump added in v0.4.1

func (m *Scheduler) DebugDump() *sonm.SchedulerData

func (*Scheduler) GetCommitedFree added in v0.4.13

func (m *Scheduler) GetCommitedFree() (*sonm.AskPlanResources, error)

func (*Scheduler) MakeRoomAndCommit added in v0.4.13

func (m *Scheduler) MakeRoomAndCommit(askPlan *sonm.AskPlan) (ejectedAskPlans []string, err error)

func (*Scheduler) OnDealFinish added in v0.4.5

func (m *Scheduler) OnDealFinish(taskID string) error

func (*Scheduler) Release added in v0.4.1

func (m *Scheduler) Release(askPlanID string) error

func (*Scheduler) ReleaseTask added in v0.4.1

func (m *Scheduler) ReleaseTask(taskID string) error

func (*Scheduler) ResourceByTask added in v0.4.11

func (m *Scheduler) ResourceByTask(taskID string) (*sonm.AskPlanResources, error)

Jump to

Keyboard shortcuts

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