resources

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: Apache-2.0, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LOOKS_DEAD_TIMEOUT = 10 * time.Minute // Time w/o minute heartbeats

Functions

func CleanupMachines

func CleanupMachines(ctx context.Context, db *harmonydb.DB) int

func DiskFree

func DiskFree(path string) (uint64, error)

Types

type Reg

type Reg struct {
	Resources
	// contains filtered or unexported fields
}

func Register

func Register(db *harmonydb.DB, hostnameAndPort string) (*Reg, error)

func (*Reg) Shutdown

func (res *Reg) Shutdown()

type Resources

type Resources struct {
	Cpu       int
	Gpu       float64
	Ram       uint64
	MachineID int
	Storage
}

type Storage added in v1.27.0

type Storage interface {
	HasCapacity() bool

	// This allows some other system to claim space for this task.
	Claim(taskID int) error

	// This allows some other system to consider the task done.
	// It's up to the caller to remove the data, if that applies.
	MarkComplete(taskID int) error
}

Optional Storage management.

Directories

Path Synopsis
Package cl was borrowed from the go-opencl library which is more complex and doesn't compile well for our needs.
Package cl was borrowed from the go-opencl library which is more complex and doesn't compile well for our needs.

Jump to

Keyboard shortcuts

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