registrar

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInProgress = errors.New("registration is still in progress")
	ErrFailed     = errors.New("registration failed")
)

Functions

This section is empty.

Types

type Registrar

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

func (*Registrar) NodeID

func (r *Registrar) NodeID() (uint32, error)

func (*Registrar) TwinID

func (r *Registrar) TwinID() (uint32, error)

type RegistrationInfo

type RegistrationInfo struct {
	Capacity     gridtypes.Capacity
	Location     geoip.Location
	SecureBoot   bool
	Virtualized  bool
	SerialNumber string
	// List of gpus short name
	GPUs map[string]interface{}
}

func (RegistrationInfo) WithCapacity

func (RegistrationInfo) WithGPU

func (r RegistrationInfo) WithGPU(short string) RegistrationInfo

func (RegistrationInfo) WithLocation

func (r RegistrationInfo) WithLocation(v geoip.Location) RegistrationInfo

func (RegistrationInfo) WithSecureBoot

func (r RegistrationInfo) WithSecureBoot(v bool) RegistrationInfo

func (RegistrationInfo) WithSerialNumber

func (r RegistrationInfo) WithSerialNumber(v string) RegistrationInfo

func (RegistrationInfo) WithVirtualized

func (r RegistrationInfo) WithVirtualized(v bool) RegistrationInfo

type RegistrationState

type RegistrationState string

should any of this be moved to pkg?

const (
	Failed     RegistrationState = "Failed"
	InProgress RegistrationState = "InProgress"
	Done       RegistrationState = "Done"
)

type State

type State struct {
	NodeID uint32
	TwinID uint32
	State  RegistrationState
	Msg    string
}

func DoneState

func DoneState(nodeID uint32, twinID uint32) State

func FailedState

func FailedState(err error) State

func InProgressState

func InProgressState() State

Jump to

Keyboard shortcuts

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