model

package
v0.0.0-...-ed3f6ae Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Buffer

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

	ExpiresAt *time.Time `json:"expiresAt,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"`
	Sockets          []Socket           `json:"sockets,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"`
	Identity         string             `json:"identity,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,omitempty"`
	Version   *int       `json:"version,omitempty"`
	CreatedAt *time.Time `json:"createdAt,omitempty"`
}

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"`
	Shm      *resource.Quantity        `json:"shm,omitempty"`
}

type ErrorInfo

type ErrorInfo struct {
	Code        string   `json:"code"`
	Message     string   `json:"message"`
	ApiVersions []string `json:"apiVersions,omitempty"`
}

func (*ErrorInfo) Error

func (e *ErrorInfo) Error() string

type ErrorResponse

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

type ExportBuffersRequest

type ExportBuffersRequest struct {
	SourceStorageAccountName   string            `json:"sourceStorageAccountName"`
	DestinationStorageEndpoint string            `json:"destinationStorageEndpoint"`
	Filters                    map[string]string `json:"filters,omitempty"`
	HashIds                    bool              `json:"hashIds,omitempty"`
}

type ImportBuffersRequest

type ImportBuffersRequest struct {
	StorageAccountName string `json:"storageAccountName"`
}

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
	Kind            string            `json:"kind,omitempty"`
	Job             RunCodeTarget     `json:"job,omitempty"`
	Worker          *RunCodeTarget    `json:"worker,omitempty"`
	Cluster         string            `json:"cluster,omitempty"`
	TimeoutSeconds  *int              `json:"timeoutSeconds,omitempty"`
	Tags            map[string]string `json:"tags,omitempty"`
	ETag            string            `json:"eTag,omitempty"`
	BufferAccessTtl string            `json:"bufferAccessTtl,omitempty"`
}

type RunCodeTarget

type RunCodeTarget struct {
	Codespec  CodespecRef       `json:"codespec"`
	Buffers   map[string]string `json:"buffers,omitempty"`
	Tags      map[string]string `json:"tags,omitempty"`
	BufferTtl string            `json:"bufferTtl,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"`
	StartedAt    *time.Time        `json:"startedAt,omitempty"`
	FinishedAt   *time.Time        `json:"finishedAt,omitempty"`
	Tags         map[string]string `json:"tags,omitempty"`
}

type RunStatus

type RunStatus uint
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 {
	RbacEnabled       bool     `json:"rbacEnabled,omitempty"`
	Authority         string   `json:"authority,omitempty"`
	Audience          string   `json:"audience,omitempty"`
	ApiAppUri         string   `json:"serverAppUri,omitempty"`
	ApiAppId          string   `json:"serverAppId,omitempty"`
	CliAppUri         string   `json:"cliAppUri,omitempty"`
	CliAppId          string   `json:"cliAppId,omitempty"`
	Capabilities      []string `json:"capabilities,omitempty"`
	ApiVersions       []string `json:"apiVersions,omitempty"`
	DataPlaneProxy    string   `json:"dataPlaneProxy,omitempty"`    // Only used by tyger-proxy
	TlsCaCertificates string   `json:"tlsCaCertificates,omitempty"` // Only used by tyger-proxy
	StorageEndpoints  []string `json:"storageEndpoints,omitempty"`
}

type Socket

type Socket struct {
	Port         int    `json:"port"`
	InputBuffer  string `json:"inputBuffer,omitempty"`
	OutputBuffer string `json:"outputBuffer,omitempty"`
}

type StorageAccount

type StorageAccount struct {
	Name     string `json:"name"`
	Location string `json:"location"`
	Endpoint string `json:"endpoint"`
}

Jump to

Keyboard shortcuts

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