statemanager

package
v0.0.0-...-baf8ae7 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	GetRegions(ctx context.Context) ([]vm.Region, error)
	RegisterNodes(ctx context.Context, nodes []vm.NodeCapacityInfo) error
	DeleteNodes(ctx context.Context, nodeIds []vm.NodeId) error
	ClearNodes(ctx context.Context) error
	CreateVM(ctx context.Context, vmId vm.Id, region vm.Region) (vm.Info, error)
	RegisterVM(ctx context.Context, info vm.Info) error
	DeleteVMs(ctx context.Context, vms []vm.Info) error
	GetVMs(ctx context.Context, ids []vm.Id) ([]vm.Info, error)
	HasVM(ctx context.Context, id vm.Id) (bool, error)
	Heartbeat(ctx context.Context, id vm.Id) error
	GetExpiredVMs(ctx context.Context) ([]vm.Id, error)
	OnCapacityIncrease(fn func(region vm.Region))
	SetVersion(ctx context.Context, version interface{}) error
	GetVersion(ctx context.Context) (string, error)
}

func New

func New(ctx context.Context, configSource config.Source, connPool *supervisor.ConnPool) (Manager, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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