sql

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReadModel

func NewReadModel(ctx context.Context, db *gorm.DB) (query.ReadModel, error)

NewReadModel ...

func NewRepo

func NewRepo(ctx context.Context, db *gorm.DB) (domain.Repo, error)

NewRepo ...

Types

type Capacity

type Capacity struct {
	Count       *int         `json:"count,omitempty"`
	CPUCores    *int         `json:"cpu_cores,omitempty"`
	RamGB       *float64     `json:"ram_gb,omitempty"` // nolint
	DiskGB      *float64     `json:"disk_gb,omitempty"`
	GPUCapacity *GPUCapacity `json:"gpu_capacity,omitempty"`
}

Capacity ...

type Cluster

type Cluster struct {
	ID                 string    `gorm:"column:id;type:VARCHAR(32);not null;primaryKey"`
	HeartbeatTimestamp time.Time `gorm:"column:heartbeat_timestamp;type:DATETIME;not null"`
	Capacity           *Capacity `gorm:"column:capacity;type:LONGTEXT;serializer:json"`
	Limits             *Limits   `gorm:"column:limits;type:LONGTEXT;serializer:json"`
}

Cluster ...

func (*Cluster) TableName

func (c *Cluster) TableName() string

TableName ...

type GPUCapacity

type GPUCapacity struct {
	GPU map[string]float64 `json:"gpu,omitempty"`
}

GPUCapacity ...

type GPULimit

type GPULimit struct {
	GPU map[string]float64 `json:"gpu,omitempty"`
}

GPULimit ...

type Limits

type Limits struct {
	CPUCores *int      `json:"cpu_cores,omitempty"`
	RamGB    *float64  `json:"ram_gb,omitempty"` // nolint
	GPULimit *GPULimit `json:"gpu_limit,omitempty"`
}

Limits ...

Jump to

Keyboard shortcuts

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