Discover Packages
github.com/Juice-Labs/agent
pkg
api
package
Version:
v0.1.1
Opens a new window with list of versions in this module.
Published: Jun 26, 2023
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
Documentation
¶
* Copyright (c) 2023 Juice Technologies, Inc. All Rights Reserved.
View Source
const (
StateQueued int = iota
StateAssigned
StateActive
StateInactive
StateClosed
)
type Agent struct {
AgentBase
Id string `json:"id"`
State int `json:"state"`
MaxSessions int `json:"maxSessions"`
Gpus []Gpu `json:"gpus"`
Tags map[string ]string `json:"tags,omitempty"`
Taints map[string ]string `json:"taints,omitempty"`
Sessions []Session `json:"sessions,omitempty"`
}
type AgentBase struct {
Version string `json:"version"`
Hostname string `json:"hostname"`
Address string `json:"address"`
}
type Gpu struct {
Index int `json:"index"`
Name string `json:"name"`
VendorId uint32 `json:"vendorId"`
DeviceId uint32 `json:"deviceId"`
Vram uint64 `json:"vram,omitempty"`
}
type GpuRequirements struct {
VendorId uint32 `json:"vendorId,omitempty"`
DeviceId uint32 `json:"deviceId,omitempty"`
VramRequired uint64 `json:"vramRequired,omitempty"`
}
type Session struct {
Id string `json:"id"`
State int `json:"state"`
Address string `json:"address,omitempty"`
Version string `json:"version,omitempty"`
Gpus []Gpu `json:"gpus,omitempty"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.