model

package
v0.0.0-...-ac9560e Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer struct {
	Id        string            `json:"id"`
	ETag      string            `json:"etag"`
	CreatedAt time.Time         `json:"createdAt"`
	Tags      map[string]string `json:"tags,omitempty"`
}

type BufferAccess

type BufferAccess struct {
	Uri string `json:"uri"`
}

type BufferParameters

type BufferParameters struct {
	Inputs  []string `json:"inputs,omitempty"`
	Outputs []string `json:"outputs,omitempty"`
}

type Cluster

type Cluster struct {
	Name      string     `json:"name"`
	Location  string     `json:"location"`
	NodePools []NodePool `json:"nodePools"`
}

type Codespec

type Codespec struct {
	Kind             string `json:"kind"`
	CodespecMetadata `json:",inline"`
	Buffers          *BufferParameters  `json:"buffers,omitempty"`
	Image            string             `json:"image"`
	Command          []string           `json:"command,omitempty"`
	Args             []string           `json:"args,omitempty"`
	WorkingDir       string             `json:"workingDir,omitempty"`
	Env              map[string]string  `json:"env,omitempty"`
	Resources        *CodespecResources `json:"resources,omitempty"`
	MaxReplicas      *int               `json:"maxReplicas,omitempty"`
	Endpoints        map[string]int     `json:"endpoints,omitempty"`
}

type CodespecMetadata

type CodespecMetadata struct {
	Name      string    `json:"name"`
	Version   int       `json:"version"`
	CreatedAt time.Time `json:"createdAt"`
}

type CodespecRef

type CodespecRef struct {
	Named  *NamedCodespecRef  `json:"-"`
	Inline *InlineCodespecRef `json:"-"`
}

func (CodespecRef) MarshalJSON

func (ref CodespecRef) MarshalJSON() ([]byte, error)

func (*CodespecRef) UnmarshalJSON

func (ref *CodespecRef) UnmarshalJSON(data []byte) error

type CodespecResources

type CodespecResources struct {
	Requests *OvercommittableResources `json:"requests,omitempty"`
	Limits   *OvercommittableResources `json:"limits,omitempty"`
	Gpu      *resource.Quantity        `json:"gpu,omitempty"`
}

type ErrorInfo

type ErrorInfo struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type ErrorResponse

type ErrorResponse struct {
	Error ErrorInfo `json:"error"`
}

type InlineCodespecRef

type InlineCodespecRef Codespec

type NamedCodespecRef

type NamedCodespecRef string

type NodePool

type NodePool struct {
	Name   string `json:"name"`
	VmSize string `json:"vmSize"`
}

type OvercommittableResources

type OvercommittableResources struct {
	Cpu    *resource.Quantity `json:"cpu,omitempty"`
	Memory *resource.Quantity `json:"memory,omitempty"`
}

type Page

type Page[T any] struct {
	Items    []T    `json:"items"`
	NextLink string `json:"nextLink,omitempty"`
}

type Run

type Run struct {
	RunMetadata
	Job            RunCodeTarget  `json:"job,omitempty"`
	Worker         *RunCodeTarget `json:"worker,omitempty"`
	Cluster        string         `json:"cluster,omitempty"`
	TimeoutSeconds *int           `json:"timeoutSeconds,omitempty"`
}

type RunCodeTarget

type RunCodeTarget struct {
	Codespec CodespecRef       `json:"codespec"`
	Buffers  map[string]string `json:"buffers,omitempty"`
	Tags     map[string]string `json:"tags,omitempty"`
	NodePool string            `json:"nodePool,omitempty"`
	Replicas int               `json:"replicas,omitempty"`
}

type RunMetadata

type RunMetadata struct {
	Id           int64      `json:"id,omitempty"`
	Status       *RunStatus `json:"status,omitempty"`
	StatusReason string     `json:"statusReason,omitempty"`
	RunningCount *int       `json:"runningCount,omitempty"`
	CreatedAt    time.Time  `json:"createdAt,omitempty"`
	FinishedAt   *time.Time `json:"finishedAt,omitempty"`
}

type RunStatus

type RunStatus int
const (
	// The run has been created, but is waiting to start
	Pending RunStatus = iota

	// The Run is currently running
	Running

	// Indicates that the run has failed, see the StatusReason field for information on why.
	Failed

	// Indicates that the run has compeleted successfully
	Succeeded

	// The run is in the process of being canceled.
	Canceling

	// The run was canceled.
	Canceled
)

func (RunStatus) MarshalJSON

func (status RunStatus) MarshalJSON() ([]byte, error)

func (RunStatus) String

func (status RunStatus) String() string

func (*RunStatus) UnmarshalJSON

func (status *RunStatus) UnmarshalJSON(b []byte) error

type ServiceMetadata

type ServiceMetadata struct {
	Authority      string `json:"authority"`
	Audience       string `json:"audience"`
	CliAppUri      string `json:"cliAppUri"`
	DataPlaneProxy string `json:"dataPlaneProxy,omitempty"`
}

Jump to

Keyboard shortcuts

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