extendedresource

package
v1.25.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DataFileName file name of extended resource db data
	DataFileName = "bcs-executor-extendedresource.db"
	// LockerFileName file name of extended resource lock for multiple executor
	LockerFileName = "bcs-executor-extendedresource.lock"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

Driver data driver for extended resources

func NewDriver

func NewDriver(dir string) *Driver

NewDriver create extended resources data driver

func (*Driver) AddRecord

func (d *Driver) AddRecord(resourceType, taskKey string, devices []string) error

AddRecord add record of extended resources

func (*Driver) DelRecord

func (d *Driver) DelRecord(resourceType, taskKey string) error

DelRecord delete record

func (*Driver) ListRecordByResourceType

func (d *Driver) ListRecordByResourceType(resourceType string) (map[string]string, error)

ListRecordByResourceType list all records of certain resource type

func (*Driver) Lock

func (d *Driver) Lock() error

Lock should not lock multiple times

func (*Driver) Unlock

func (d *Driver) Unlock() error

Unlock do unlock

Jump to

Keyboard shortcuts

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