gpu_group_repo

package
v0.0.0-...-e71a76f Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrGpuLeaseAlreadyExists is returned when a GPU lease already exists for a user.
	ErrGpuLeaseAlreadyExists = fmt.Errorf("gpu lease already exists")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	base_clients.ResourceClient[model.GpuGroup]
}

Client is used to manage GPU groups in the database.

func New

func New() *Client

New returns a new GPU group client.

func (*Client) Create

func (client *Client) Create(name, displayName, zone, vendor, deviceID, vendorID string, total int) error

func (*Client) WithPagination

func (client *Client) WithPagination(page, pageSize int) *Client

WithPagination sets the pagination for the client.

func (*Client) WithZone

func (client *Client) WithZone(zone string) *Client

WithZone adds a filter to the client to only include groups with the given zone.

Jump to

Keyboard shortcuts

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