nova

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const GetComputeNodes = `` /* 460-byte string literal not displayed */
View Source
const GetInstances = `` /* 341-byte string literal not displayed */
View Source
const GetServices = `-- name: GetServices :many
SELECT 
    id,
    uuid,
    host,
    ` + "`" + `binary` + "`" + `,
    topic,
    disabled,
    disabled_reason,
    last_seen_up,
    forced_down,
    version,
    report_count,
    deleted
FROM services
WHERE deleted = 0
  AND last_seen_up IS NOT NULL
  AND topic IS NOT NULL
`

Variables

This section is empty.

Functions

This section is empty.

Types

type ComputeNode

type ComputeNode struct {
	CreatedAt           sql.NullTime
	UpdatedAt           sql.NullTime
	DeletedAt           sql.NullTime
	ID                  int32
	ServiceID           sql.NullInt32
	Vcpus               int32
	MemoryMb            int32
	LocalGb             int32
	VcpusUsed           int32
	MemoryMbUsed        int32
	LocalGbUsed         int32
	HypervisorType      string
	HypervisorVersion   int32
	CpuInfo             string
	DiskAvailableLeast  sql.NullInt32
	FreeRamMb           sql.NullInt32
	FreeDiskGb          sql.NullInt32
	CurrentWorkload     sql.NullInt32
	RunningVms          sql.NullInt32
	HypervisorHostname  sql.NullString
	Deleted             sql.NullInt32
	HostIp              sql.NullString
	SupportedInstances  sql.NullString
	PciStats            sql.NullString
	Metrics             sql.NullString
	ExtraResources      sql.NullString
	Stats               sql.NullString
	NumaTopology        sql.NullString
	Host                sql.NullString
	RamAllocationRatio  sql.NullFloat64
	CpuAllocationRatio  sql.NullFloat64
	Uuid                sql.NullString
	DiskAllocationRatio sql.NullFloat64
	Mapped              sql.NullInt32
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type GetComputeNodesRow

type GetComputeNodesRow struct {
	ID                  int32
	Uuid                sql.NullString
	Host                sql.NullString
	HypervisorHostname  sql.NullString
	HypervisorType      string
	HypervisorVersion   int32
	Vcpus               int32
	VcpusUsed           int32
	MemoryMb            int32
	MemoryMbUsed        int32
	LocalGb             int32
	LocalGbUsed         int32
	DiskAvailableLeast  sql.NullInt32
	FreeRamMb           sql.NullInt32
	FreeDiskGb          sql.NullInt32
	CurrentWorkload     sql.NullInt32
	RunningVms          sql.NullInt32
	CpuAllocationRatio  sql.NullFloat64
	RamAllocationRatio  sql.NullFloat64
	DiskAllocationRatio sql.NullFloat64
	Deleted             sql.NullInt32
}

type GetInstancesRow

type GetInstancesRow struct {
	ID               int32
	Uuid             string
	DisplayName      sql.NullString
	UserID           sql.NullString
	ProjectID        sql.NullString
	Host             sql.NullString
	AvailabilityZone sql.NullString
	VmState          sql.NullString
	PowerState       sql.NullInt32
	TaskState        sql.NullString
	MemoryMb         sql.NullInt32
	Vcpus            sql.NullInt32
	RootGb           sql.NullInt32
	EphemeralGb      sql.NullInt32
	LaunchedAt       sql.NullTime
	TerminatedAt     sql.NullTime
	InstanceTypeID   sql.NullInt32
	Deleted          sql.NullInt32
}

type GetServicesRow

type GetServicesRow struct {
	ID             int32
	Uuid           sql.NullString
	Host           sql.NullString
	Binary         sql.NullString
	Topic          sql.NullString
	Disabled       sql.NullBool
	DisabledReason sql.NullString
	LastSeenUp     sql.NullTime
	ForcedDown     sql.NullBool
	Version        sql.NullInt32
	ReportCount    int32
	Deleted        sql.NullInt32
}

type Instance

type Instance struct {
	CreatedAt              sql.NullTime
	UpdatedAt              sql.NullTime
	DeletedAt              sql.NullTime
	ID                     int32
	InternalID             sql.NullInt32
	UserID                 sql.NullString
	ProjectID              sql.NullString
	ImageRef               sql.NullString
	KernelID               sql.NullString
	RamdiskID              sql.NullString
	LaunchIndex            sql.NullInt32
	KeyName                sql.NullString
	KeyData                sql.NullString
	PowerState             sql.NullInt32
	VmState                sql.NullString
	MemoryMb               sql.NullInt32
	Vcpus                  sql.NullInt32
	Hostname               sql.NullString
	Host                   sql.NullString
	UserData               sql.NullString
	ReservationID          sql.NullString
	LaunchedAt             sql.NullTime
	TerminatedAt           sql.NullTime
	DisplayName            sql.NullString
	DisplayDescription     sql.NullString
	AvailabilityZone       sql.NullString
	Locked                 sql.NullBool
	OsType                 sql.NullString
	LaunchedOn             sql.NullString
	InstanceTypeID         sql.NullInt32
	VmMode                 sql.NullString
	Uuid                   string
	Architecture           sql.NullString
	RootDeviceName         sql.NullString
	AccessIpV4             sql.NullString
	AccessIpV6             sql.NullString
	ConfigDrive            sql.NullString
	TaskState              sql.NullString
	DefaultEphemeralDevice sql.NullString
	DefaultSwapDevice      sql.NullString
	Progress               sql.NullInt32
	AutoDiskConfig         sql.NullBool
	ShutdownTerminate      sql.NullBool
	DisableTerminate       sql.NullBool
	RootGb                 sql.NullInt32
	EphemeralGb            sql.NullInt32
	CellName               sql.NullString
	Node                   sql.NullString
	Deleted                sql.NullInt32
	LockedBy               NullInstancesLockedBy
	Cleaned                sql.NullInt32
	EphemeralKeyUuid       sql.NullString
	Hidden                 sql.NullBool
	ComputeID              sql.NullInt64
}

type InstancesLockedBy

type InstancesLockedBy string
const (
	InstancesLockedByOwner InstancesLockedBy = "owner"
	InstancesLockedByAdmin InstancesLockedBy = "admin"
)

func (*InstancesLockedBy) Scan

func (e *InstancesLockedBy) Scan(src interface{}) error

type NullInstancesLockedBy

type NullInstancesLockedBy struct {
	InstancesLockedBy InstancesLockedBy
	Valid             bool // Valid is true if InstancesLockedBy is not NULL
}

func (*NullInstancesLockedBy) Scan

func (ns *NullInstancesLockedBy) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullInstancesLockedBy) Value

func (ns NullInstancesLockedBy) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) GetComputeNodes

func (q *Queries) GetComputeNodes(ctx context.Context) ([]GetComputeNodesRow, error)

func (*Queries) GetInstances

func (q *Queries) GetInstances(ctx context.Context) ([]GetInstancesRow, error)

func (*Queries) GetServices

func (q *Queries) GetServices(ctx context.Context) ([]GetServicesRow, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type Service

type Service struct {
	CreatedAt      sql.NullTime
	UpdatedAt      sql.NullTime
	DeletedAt      sql.NullTime
	ID             int32
	Host           sql.NullString
	Binary         sql.NullString
	Topic          sql.NullString
	ReportCount    int32
	Disabled       sql.NullBool
	Deleted        sql.NullInt32
	DisabledReason sql.NullString
	LastSeenUp     sql.NullTime
	ForcedDown     sql.NullBool
	Version        sql.NullInt32
	Uuid           sql.NullString
}

Jump to

Keyboard shortcuts

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