redisstatemanager

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: 8 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 struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, rdb redis.UniversalClient) *Manager

func (*Manager) ClearNodes

func (m *Manager) ClearNodes(ctx context.Context) error

func (*Manager) CreateVM

func (m *Manager) CreateVM(ctx context.Context, vmId vm.Id, region vm.Region) (vm.Info, error)

func (*Manager) DeleteNodes

func (m *Manager) DeleteNodes(ctx context.Context, nodeIds []vm.NodeId) error

func (*Manager) DeleteVMs

func (m *Manager) DeleteVMs(ctx context.Context, vms []vm.Info) error

func (*Manager) GetExpiredVMs

func (m *Manager) GetExpiredVMs(ctx context.Context) ([]vm.Id, error)

func (*Manager) GetRegions

func (m *Manager) GetRegions(ctx context.Context) ([]vm.Region, error)

func (*Manager) GetVMs

func (m *Manager) GetVMs(ctx context.Context, ids []vm.Id) ([]vm.Info, error)

func (*Manager) GetVersion

func (m *Manager) GetVersion(ctx context.Context) (string, error)

func (*Manager) HasVM

func (m *Manager) HasVM(ctx context.Context, id vm.Id) (bool, error)

func (*Manager) Heartbeat

func (m *Manager) Heartbeat(ctx context.Context, id vm.Id) error

func (*Manager) OnCapacityIncrease

func (m *Manager) OnCapacityIncrease(fn func(region vm.Region))

func (*Manager) RegisterNodes

func (m *Manager) RegisterNodes(ctx context.Context, nodes []vm.NodeCapacityInfo) error

func (*Manager) RegisterVM

func (m *Manager) RegisterVM(ctx context.Context, info vm.Info) error

func (*Manager) SetVersion

func (m *Manager) SetVersion(ctx context.Context, version interface{}) error

Jump to

Keyboard shortcuts

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