Documentation ¶
Index ¶
- Constants
- Variables
- func GpuTypesToStrings(gpus []GpuType) []string
- func NewProviderNotImplemented() error
- func ParseConditionFromQueryFilters(out interface{}, queryFilters ...QueryFilter)
- type AbstractionConfig
- type AppConfig
- type Autoscaler
- type AutoscalerType
- type AvailableHost
- type BaseFilter
- type BotConfig
- type CORSConfig
- type CapacityUpdateType
- type ConcurrencyLimit
- type ContainerAlreadyScheduledError
- type ContainerEvent
- type ContainerRequest
- type ContainerResourceUsage
- type ContainerState
- type ContainerStatus
- type CrusoeProviderConfig
- type CunoFSConfig
- type DatabaseConfig
- type Deployment
- type DeploymentFilter
- type DeploymentWithRelated
- type DockerImageRegistryConfig
- type EC2ProviderConfig
- type ElasticSearchConfig
- type ErrContainerStateNotFound
- type ErrExceededTaskLimit
- type ErrInvalidWorkerStatus
- type ErrNoSuitableWorkerFound
- type ErrWorkerNotFound
- type EventClient
- type EventContainerLifecycleSchema
- type EventContainerMetricsData
- type EventContainerMetricsSchema
- type EventContainerStatusRequestedSchema
- type EventSink
- type EventStubSchema
- type EventTaskSchema
- type EventWorkerLifecycleSchema
- type ExitCodeError
- type FilterFieldMapping
- type FluentBitConfig
- type FluentBitEventConfig
- type FluentBitEventMapping
- type GPUType
- type GRPCConfig
- type GatewayServiceConfig
- type GenericProviderConfig
- type GpuType
- type HTTPConfig
- type HydraProviderConfig
- type Image
- type ImageRegistriesConfig
- type ImageServiceConfig
- type InternalService
- type JuiceFSConfig
- type LambdaLabsProviderConfig
- type MachineProvider
- type MachineStatus
- type MetricsCollector
- type MonitoringConfig
- type Mount
- type MountPointConfig
- type OCIProviderConfig
- type Object
- type OpenMeterConfig
- type PoolMode
- type PostgresConfig
- type PrometheusConfig
- type ProviderAgentConfig
- type ProviderComputeRequest
- type ProviderConfig
- type ProviderMachine
- type ProviderMachineMetrics
- type ProviderMachineState
- type ProviderNotImplemented
- type ProxyConfig
- type PythonStandaloneConfig
- type QueryFilter
- type QuotaDoesNotExistError
- type RedisConfig
- type RedisMode
- type RunnerConfig
- type Runtime
- type S3ImageRegistryConfig
- type ScheduledJob
- type ScheduledJobPayload
- type Secret
- type StopContainerArgs
- type StorageConfig
- type StringSlice
- type Stub
- type StubConfigV1
- type StubFilter
- type StubGetURLFilter
- type StubLimits
- type StubType
- type StubWithRelated
- type TailscaleConfig
- type Task
- type TaskCancellationReason
- type TaskCountByTime
- type TaskCountPerDeployment
- type TaskExecutor
- type TaskFilter
- type TaskInterface
- type TaskMessage
- type TaskMetadata
- type TaskOutput
- type TaskParams
- type TaskPayload
- type TaskPolicy
- type TaskStats
- type TaskStatus
- type TaskWithRelated
- type TelemetryConfig
- type ThrottledByConcurrencyLimitError
- type Token
- type Volume
- type VolumeWithRelated
- type Worker
- type WorkerConfig
- type WorkerPoolConfig
- type WorkerPoolJobSpecConfig
- type WorkerPoolJobSpecPoolSizingConfig
- type WorkerPoolSizingConfig
- type WorkerStatus
- type Workspace
Constants ¶
View Source
const ( TokenTypeClusterAdmin string = "admin" TokenTypeWorkspace string = "workspace" TokenTypeWorker string = "worker" TokenTypeMachine string = "machine" )
View Source
const ( StubTypeFunction string = "function" StubTypeFunctionDeployment string = "function/deployment" StubTypeFunctionServe string = "function/serve" StubTypeContainer string = "container" StubTypeTaskQueue string = "taskqueue" StubTypeTaskQueueDeployment string = "taskqueue/deployment" StubTypeTaskQueueServe string = "taskqueue/serve" StubTypeEndpoint string = "endpoint" StubTypeEndpointDeployment string = "endpoint/deployment" StubTypeEndpointServe string = "endpoint/serve" StubTypeASGI string = "asgi" StubTypeASGIDeployment string = "asgi/deployment" StubTypeASGIServe string = "asgi/serve" StubTypeScheduledJob string = "schedule" StubTypeScheduledJobDeployment string = "schedule/deployment" StubTypeBot string = "bot" StubTypeBotDeployment string = "bot/deployment" StubTypeBotServe string = "bot/serve" )
View Source
const ( DefaultGatewayServiceName string = "gateway" DefaultExtractedObjectPath string = "/data/unpacked" DefaultVolumesPath string = "/data/volumes" DefaultObjectPath string = "/data/objects" DefaultOutputsPath string = "/data/outputs" DefaultFilesystemName string = "beta9-fs" DefaultFilesystemPath string = "/data" FailedDeploymentContainerThreshold int = 3 FailedContainerThreshold int = 1 RequestTimeoutDurationS time.Duration = 175 * time.Second ContainerVolumePath string = "/volumes" )
View Source
const ( MachineStatusRegistered MachineStatus = "registered" MachineStatusPending MachineStatus = "pending" MachinePendingExpirationS int = 3600 // 1 hour MachineKeepaliveExpirationS int = 300 // 5 minutes MachineEmptyConsolidationPeriodM time.Duration = 10 * time.Minute )
View Source
const ( WorkerStatusAvailable WorkerStatus = "available" WorkerStatusPending WorkerStatus = "pending" WorkerStatusDisabled WorkerStatus = "disabled" WorkerStateTtlS int = 60 )
View Source
const ( ContainerDurationEmissionInterval time.Duration = 5 * time.Second ContainerResourceUsageEmissionInterval time.Duration = 3 * time.Second )
View Source
const ( WorkerLifecycleStatsKey string = "beta9.worker.usage.spawner.lifecycle" WorkerDurationStatsKey string = "beta9.worker.usage.spawner.duration" WorkerUserCodeVolume string = "/mnt/code" WorkerUserOutputVolume string = "/data/outputs" WorkerDurationEmissionInterval time.Duration = 30 * time.Second WorkerKeepAliveInterval time.Duration = 15 * time.Second )
View Source
const ( WorkerContainerExitCodeInvalidCustomImage = 555 WorkerContainerExitCodeIncorrectImageArch = 556 WorkerContainerExitCodeIncorrectImageOs = 557 WorkerContainerExitCodeUnknownError = 1 WorkerContainerExitCodeSuccess = 0 )
View Source
const ( // Used specifically for runc states. // Not the same as the scheduler container states. RuncContainerStatusCreated string = "created" RuncContainerStatusRunning string = "running" RuncContainerStatusPaused string = "paused" RuncContainerStatusStopped string = "stopped" )
View Source
const (
BuildContainerPrefix string = "build-"
)
View Source
const ContainerExitCodeTtlS int = 300
View Source
const ContainerStateTtlS int = 120
View Source
const ContainerStateTtlSWhilePending int = 600
View Source
const (
DefaultCPUWorkerPoolName = "default"
)
View Source
const WorkspaceQuotaTtlS int = 600
Variables ¶
View Source
var ( /* Stripe events utilize a format of <resource>.<action> 1. <resource>: This indicates the type of object or resource that the event pertains to, such as payment_intent, invoice, customer, subscription, etc. 2. <action>: This indicates the specific action or change that occurred with that resource, such as created, updated, deleted, succeeded, etc. */ EventTaskUpdated = "task.updated" EventTaskCreated = "task.created" EventContainerLifecycle = "container.lifecycle" EventContainerMetrics = "container.metrics" EventWorkerLifecycle = "worker.lifecycle" EventStubDeploy = "stub.deploy" EventStubServe = "stub.serve" EventStubRun = "stub.run" )
View Source
var ( EventContainerLifecycleRequested = "requested" EventContainerLifecycleScheduled = "scheduled" EventContainerLifecycleStarted = "started" EventContainerLifecycleStopped = "stopped" EventContainerLifecycleFailed = "failed" )
View Source
var ( EventWorkerLifecycleStarted = "started" EventWorkerLifecycleStopped = "stopped" )
View Source
var ( // Scheduler keys MetricsSchedulerContainerScheduled = "container_scheduled_count" MetricsSchedulerContainerRequested = "container_requested_count" // Worker keys MetricsWorkerContainerDuration = "container_duration_milliseconds" )
View Source
var DefaultTaskPolicy = TaskPolicy{
MaxRetries: 3,
Timeout: 3600,
}
View Source
var EventContainerLifecycleSchemaVersion = "1.0"
View Source
var EventContainerMetricsSchemaVersion = "1.0"
View Source
var EventContainerStatusRequestedSchemaVersion = "1.0"
View Source
var EventStubSchemaVersion = "1.0"
View Source
var EventTaskSchemaVersion = "1.0"
View Source
var EventWorkerLifecycleSchemaVersion = "1.0"
View Source
var MaxTaskRetries = 5
View Source
var MaxTaskTTL = 24 * 60 * 60
View Source
var WorkerContainerExitCodes = map[int]string{ WorkerContainerExitCodeSuccess: "Success", WorkerContainerExitCodeUnknownError: "UnknownError", WorkerContainerExitCodeIncorrectImageArch: "InvalidArch: Image is not amd64/x86_64", WorkerContainerExitCodeInvalidCustomImage: "InvalidCustomImage: Could not find custom image", WorkerContainerExitCodeIncorrectImageOs: "InvalidOs: Image is not built for linux", }
Functions ¶
func GpuTypesToStrings ¶
func NewProviderNotImplemented ¶
func NewProviderNotImplemented() error
func ParseConditionFromQueryFilters ¶
func ParseConditionFromQueryFilters(out interface{}, queryFilters ...QueryFilter)
Types ¶
type AbstractionConfig ¶
type AbstractionConfig struct {
Bot BotConfig `key:"bot" json:"bot"`
}
type AppConfig ¶
type AppConfig struct { ClusterName string `key:"clusterName" json:"cluster_name"` DebugMode bool `key:"debugMode" json:"debug_mode"` Database DatabaseConfig `key:"database" json:"database"` GatewayService GatewayServiceConfig `key:"gateway" json:"gateway_service"` ImageService ImageServiceConfig `key:"imageservice" json:"image_service"` Storage StorageConfig `key:"storage" json:"storage"` Worker WorkerConfig `key:"worker" json:"worker"` Providers ProviderConfig `key:"providers" json:"providers"` Tailscale TailscaleConfig `key:"tailscale" json:"tailscale"` Proxy ProxyConfig `key:"proxy" json:"proxy"` Monitoring MonitoringConfig `key:"monitoring" json:"monitoring"` BlobCache blobcache.BlobCacheConfig `key:"blobcache" json:"blobcache"` Abstractions AbstractionConfig `key:"abstractions" json:"abstractions"` }
type Autoscaler ¶
type Autoscaler struct { Type AutoscalerType `json:"type"` MaxContainers uint `json:"max_containers"` TasksPerContainer uint `json:"tasks_per_container"` }
type AutoscalerType ¶
type AutoscalerType string
const (
QueueDepthAutoscaler AutoscalerType = "queue_depth"
)
type AvailableHost ¶
type BaseFilter ¶
type CORSConfig ¶
type CapacityUpdateType ¶
type CapacityUpdateType int
const ( AddCapacity CapacityUpdateType = iota RemoveCapacity )
type ConcurrencyLimit ¶
type ConcurrencyLimit struct { Id uint `db:"id" json:"-" redis:"-"` ExternalId string `db:"external_id" json:"external_id,omitempty" redis:"external_id"` GPULimit uint32 `db:"gpu_limit" json:"gpu_limit" redis:"gpu_limit"` CPUMillicoreLimit uint32 `db:"cpu_millicore_limit" json:"cpu_millicore_limit" redis:"cpu_millicore_limit"` CreatedAt time.Time `db:"created_at" json:"created_at,omitempty" redis:"-"` UpdatedAt time.Time `db:"updated_at" json:"updated_at,omitempty" redis:"-"` }
type ContainerAlreadyScheduledError ¶
type ContainerAlreadyScheduledError struct {
Msg string
}
func (*ContainerAlreadyScheduledError) Error ¶
func (e *ContainerAlreadyScheduledError) Error() string
type ContainerEvent ¶
type ContainerRequest ¶
type ContainerRequest struct { ContainerId string `json:"container_id"` EntryPoint []string `json:"entry_point"` Env []string `json:"env"` Cpu int64 `json:"cpu"` Memory int64 `json:"memory"` Gpu string `json:"gpu"` GpuRequest []string `json:"gpu_request"` GpuCount uint32 `json:"gpu_count"` SourceImage *string `json:"source_image"` SourceImageCreds string `json:"source_image_creds"` ImageId string `json:"image_id"` StubId string `json:"stub_id"` WorkspaceId string `json:"workspace_id"` Workspace Workspace `json:"workspace"` Stub StubWithRelated `json:"stub"` Timestamp time.Time `json:"timestamp"` Mounts []Mount `json:"mounts"` RetryCount int `json:"retry_count"` PoolSelector string `json:"pool_selector"` Preemptable bool `json:"preemptable"` }
func (*ContainerRequest) RequiresGPU ¶
func (c *ContainerRequest) RequiresGPU() bool
type ContainerResourceUsage ¶
type ContainerState ¶
type ContainerState struct { ContainerId string `redis:"container_id" json:"container_id"` StubId string `redis:"stub_id" json:"stub_id"` Status ContainerStatus `redis:"status" json:"status"` ScheduledAt int64 `redis:"scheduled_at" json:"scheduled_at"` WorkspaceId string `redis:"workspace_id" json:"workspace_id"` Gpu string `redis:"gpu" json:"gpu"` GpuCount uint32 `redis:"gpu_count" json:"gpu_count"` Cpu int64 `redis:"cpu" json:"cpu"` Memory int64 `redis:"memory" json:"memory"` }
type ContainerStatus ¶
type ContainerStatus string
const ( ContainerStatusPending ContainerStatus = "PENDING" ContainerStatusRunning ContainerStatus = "RUNNING" ContainerStatusStopping ContainerStatus = "STOPPING" )
type CrusoeProviderConfig ¶
type CrusoeProviderConfig struct {
Agent ProviderAgentConfig `key:"agent" json:"agent"`
}
type CunoFSConfig ¶
type CunoFSConfig struct { LicenseKey string `key:"licenseKey" json:"license_key"` S3AccessKey string `key:"s3AccessKey" json:"s3_access_key"` S3SecretKey string `key:"s3SecretKey" json:"s3_secret_key"` S3EndpointUrl string `key:"s3EndpointURL" json:"s3_endpoint_url"` S3BucketName string `key:"s3BucketName" json:"s3_bucket_name"` }
type DatabaseConfig ¶
type DatabaseConfig struct { Redis RedisConfig `key:"redis" json:"redis"` Postgres PostgresConfig `key:"postgres" json:"postgres"` }
type Deployment ¶
type Deployment struct { Id uint `db:"id" json:"id"` ExternalId string `db:"external_id" json:"external_id"` Name string `db:"name" json:"name"` Active bool `db:"active" json:"active"` Subdomain string `db:"subdomain" json:"subdomain"` WorkspaceId uint `db:"workspace_id" json:"workspace_id"` // Foreign key to Workspace StubId uint `db:"stub_id" json:"stub_id"` // Foreign key to Stub StubType string `db:"stub_type" json:"stub_type"` Version uint `db:"version" json:"version"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` DeletedAt sql.NullTime `db:"deleted_at" json:"deleted_at"` }
type DeploymentFilter ¶
type DeploymentFilter struct { BaseFilter StubIds StringSlice `query:"stub_ids"` WorkspaceID uint `query:"workspace_id"` StubType string `query:"stub_type"` Name string `query:"name"` Active *bool `query:"active"` Version uint `query:"version"` Cursor string `query:"cursor"` CreatedAtStart string `query:"created_at_start"` CreatedAtEnd string `query:"created_at_end"` Pagination bool `query:"pagination"` Subdomain string `query:"subdomain"` SearchQuery string `query:"search_query"` }
type DeploymentWithRelated ¶
type DeploymentWithRelated struct { Deployment Workspace Workspace `db:"workspace" json:"workspace"` Stub Stub `db:"stub" json:"stub"` }
type EC2ProviderConfig ¶
type EC2ProviderConfig struct { AWSAccessKey string `key:"awsAccessKey" json:"aws_access_key"` AWSSecretKey string `key:"awsSecretKey" json:"aws_secret_key"` AWSRegion string `key:"awsRegion" json:"aws_region"` AMI string `key:"ami" json:"ami"` SubnetId *string `key:"subnetId" json:"subnet_id"` Agent ProviderAgentConfig `key:"agent" json:"agent"` }
type ElasticSearchConfig ¶
type ErrContainerStateNotFound ¶
type ErrContainerStateNotFound struct {
ContainerId string
}
func (*ErrContainerStateNotFound) Error ¶
func (e *ErrContainerStateNotFound) Error() string
type ErrExceededTaskLimit ¶
type ErrExceededTaskLimit struct {
MaxPendingTasks uint
}
func (*ErrExceededTaskLimit) Error ¶
func (e *ErrExceededTaskLimit) Error() string
type ErrInvalidWorkerStatus ¶
type ErrInvalidWorkerStatus struct { }
func (*ErrInvalidWorkerStatus) Error ¶
func (e *ErrInvalidWorkerStatus) Error() string
type ErrNoSuitableWorkerFound ¶
type ErrNoSuitableWorkerFound struct { }
func (*ErrNoSuitableWorkerFound) Error ¶
func (e *ErrNoSuitableWorkerFound) Error() string
type ErrWorkerNotFound ¶
type ErrWorkerNotFound struct {
WorkerId string
}
func (*ErrWorkerNotFound) Error ¶
func (e *ErrWorkerNotFound) Error() string
type EventClient ¶
type EventClient interface {
PushEvent(event cloudevents.Event) error
}
type EventContainerLifecycleSchema ¶
type EventContainerLifecycleSchema struct { ContainerID string `json:"container_id"` WorkerID string `json:"worker_id"` Status string `json:"status"` Request ContainerRequest `json:"request"` }
type EventContainerMetricsData ¶
type EventContainerMetricsData struct { CPUUsed uint64 `json:"cpu_used"` CPUTotal uint64 `json:"cpu_total"` CPUPercent float32 `json:"cpu_pct"` MemoryRSS uint64 `json:"memory_rss_bytes"` MemoryVMS uint64 `json:"memory_vms_bytes"` MemorySwap uint64 `json:"memory_swap_bytes"` MemoryTotal uint64 `json:"memory_total_bytes"` DiskReadBytes uint64 `json:"disk_read_bytes"` DiskWriteBytes uint64 `json:"disk_write_bytes"` NetworkBytesRecv uint64 `json:"network_recv_bytes"` NetworkBytesSent uint64 `json:"network_sent_bytes"` NetworkPacketsRecv uint64 `json:"network_recv_packets"` NetworkPacketsSent uint64 `json:"network_sent_packets"` GPUMemoryUsed uint64 `json:"gpu_memory_used_bytes"` GPUMemoryTotal uint64 `json:"gpu_memory_total_bytes"` GPUType string `json:"gpu_type"` }
type EventContainerMetricsSchema ¶
type EventContainerMetricsSchema struct { WorkerID string `json:"worker_id"` ContainerID string `json:"container_id"` WorkspaceID string `json:"workspace_id"` StubID string `json:"stub_id"` ContainerMetrics EventContainerMetricsData `json:"metrics"` }
type EventContainerStatusRequestedSchema ¶
type EventContainerStatusRequestedSchema struct { ContainerID string `json:"container_id"` Request ContainerRequest `json:"request"` Status string `json:"status"` }
type EventSink ¶
type EventSink = func(event []cloudevents.Event)
type EventStubSchema ¶
type EventTaskSchema ¶
type EventTaskSchema struct { ID string `json:"id"` Status TaskStatus `json:"status"` ContainerID string `json:"container_id"` StartedAt *time.Time `json:"started_at"` EndedAt *time.Time `json:"ended_at"` WorkspaceID string `json:"workspace_id"` StubID string `json:"stub_id"` CreatedAt time.Time `json:"created_at"` }
type ExitCodeError ¶
type ExitCodeError struct {
ExitCode int
}
func (*ExitCodeError) Error ¶
func (e *ExitCodeError) Error() string
type FilterFieldMapping ¶
FilterFieldMapping represents a mapping between a client-provided field and its corresponding database field, along with the values for filtering on the database field.
type FluentBitConfig ¶
type FluentBitConfig struct {
Events FluentBitEventConfig `key:"events" json:"events"`
}
type FluentBitEventConfig ¶
type FluentBitEventConfig struct { Endpoint string `key:"endpoint" json:"endpoint"` MaxConns int `key:"maxConns" json:"max_conns"` MaxIdleConns int `key:"maxIdleConns" json:"max_idle_conns"` IdleConnTimeout time.Duration `key:"idleConnTimeout" json:"idle_conn_timeout"` DialTimeout time.Duration `key:"dialTimeout" json:"dial_timeout"` KeepAlive time.Duration `key:"keepAlive" json:"keep_alive"` Mapping []FluentBitEventMapping `key:"mapping" json:"mapping"` }
type FluentBitEventMapping ¶
type GRPCConfig ¶
type GatewayServiceConfig ¶
type GatewayServiceConfig struct { Host string `key:"host" json:"host"` ExternalHost string `key:"externalHost" json:"external_host"` ExternalURL string `key:"externalURL" json:"external_url"` InvokeURLType string `key:"invokeURLType" json:"invoke_url_type"` GRPC GRPCConfig `key:"grpc" json:"grpc"` HTTP HTTPConfig `key:"http" json:"http"` ShutdownTimeout time.Duration `key:"shutdownTimeout" json:"shutdown_timeout"` StubLimits StubLimits `key:"stubLimits" json:"stub_limits"` }
type GenericProviderConfig ¶
type GenericProviderConfig struct {
Agent ProviderAgentConfig `key:"agent" json:"agent"`
}
type GpuType ¶
type GpuType string
func GPUTypesFromString ¶
func (*GpuType) MarshalJSON ¶
func (*GpuType) UnmarshalJSON ¶
type HTTPConfig ¶
type HTTPConfig struct { EnablePrettyLogs bool `key:"enablePrettyLogs" json:"enable_pretty_logs"` CORS CORSConfig `key:"cors" json:"cors"` Port int `key:"port" json:"port"` }
type HydraProviderConfig ¶
type HydraProviderConfig struct {
Agent ProviderAgentConfig `key:"agent" json:"agent"`
}
type ImageRegistriesConfig ¶
type ImageRegistriesConfig struct { Docker DockerImageRegistryConfig `key:"docker" json:"docker"` S3 S3ImageRegistryConfig `key:"s3" json:"s3"` }
type ImageServiceConfig ¶
type ImageServiceConfig struct { LocalCacheEnabled bool `key:"localCacheEnabled" json:"local_cache_enabled"` RegistryStore string `key:"registryStore" json:"registry_store"` RegistryCredentialProviderName string `key:"registryCredentialProvider" json:"registry_credential_provider_name"` Registries ImageRegistriesConfig `key:"registries" json:"registries"` EnableTLS bool `key:"enableTLS" json:"enable_tls"` BuildContainerCpu int64 `key:"buildContainerCpu" json:"build_container_cpu"` BuildContainerMemory int64 `key:"buildContainerMemory" json:"build_container_memory"` BuildContainerPoolSelector string `key:"buildContainerPoolSelector" json:"build_container_pool_selector"` Runner RunnerConfig `key:"runner" json:"runner"` }
type InternalService ¶
type JuiceFSConfig ¶
type JuiceFSConfig struct { RedisURI string `key:"redisURI" json:"redis_uri"` AWSS3Bucket string `key:"awsS3Bucket" json:"aws_s3_bucket"` AWSAccessKey string `key:"awsAccessKey" json:"aws_access_key"` AWSSecretKey string `key:"awsSecretKey" json:"aws_secret_key"` CacheSize int64 `key:"cacheSize" json:"cache_size"` BlockSize int64 `key:"blockSize" json:"block_size"` Prefetch int64 `key:"prefetch" json:"prefetch"` BufferSize int64 `key:"bufferSize" json:"buffer_size"` }
type LambdaLabsProviderConfig ¶
type LambdaLabsProviderConfig struct { ApiKey string `key:"apiKey" json:"apiKey"` Agent ProviderAgentConfig `key:"agent" json:"agent"` }
type MachineProvider ¶
type MachineProvider string
var ( ProviderEC2 MachineProvider = "ec2" ProviderOCI MachineProvider = "oci" ProviderLambdaLabs MachineProvider = "lambda" ProviderCrusoe MachineProvider = "crusoe" ProviderHydra MachineProvider = "hydra" ProviderGeneric MachineProvider = "generic" )
type MachineStatus ¶
type MachineStatus string
type MetricsCollector ¶
type MetricsCollector string
var ( MetricsCollectorPrometheus MetricsCollector = "prometheus" MetricsCollectorOpenMeter MetricsCollector = "openmeter" )
type MonitoringConfig ¶
type MonitoringConfig struct { MetricsCollector string `key:"metricsCollector" json:"metrics_collector"` Prometheus PrometheusConfig `key:"prometheus" json:"prometheus"` OpenMeter OpenMeterConfig `key:"openmeter" json:"openmeter"` FluentBit FluentBitConfig `key:"fluentbit" json:"fluentbit"` Telemetry TelemetryConfig `key:"telemetry" json:"telemetry"` ContainerMetricsInterval time.Duration `key:"containerMetricsInterval" json:"container_metrics_interval"` }
type MountPointConfig ¶
type OCIProviderConfig ¶
type OCIProviderConfig struct { Tenancy string `key:"tenancy" json:"tenancy"` UserId string `key:"userId" json:"user_id"` Region string `key:"region" json:"region"` FingerPrint string `key:"fingerprint" json:"fingerprint"` PrivateKey string `key:"privateKey" json:"private_key"` PrivateKeyPassword string `key:"privateKeyPassword" json:"private_key_password"` CompartmentId string `key:"compartmentId" json:"compartment_id"` SubnetId string `key:"subnetId" json:"subnet_id"` AvailabilityDomain string `key:"availabilityDomain" json:"availability_domain"` ImageId string `key:"imageId" json:"image_id"` Agent ProviderAgentConfig `key:"agent" json:"agent"` }
type Object ¶
type Object struct { Id uint `db:"id" json:"id"` ExternalId string `db:"external_id" json:"external_id"` Hash string `db:"hash" json:"hash"` Size int64 `db:"size" json:"size"` WorkspaceId uint `db:"workspace_id" json:"workspace_id"` // Foreign key to Workspace CreatedAt time.Time `db:"created_at" json:"created_at"` }
type OpenMeterConfig ¶
type PostgresConfig ¶
type PostgresConfig struct { Host string `key:"host" json:"host"` Port int `key:"port" json:"port"` Name string `key:"name" json:"name"` Username string `key:"username" json:"username"` Password string `key:"password" json:"password"` TimeZone string `key:"timezone" json:"timezone"` EnableTLS bool `key:"enableTLS" json:"enable_tls"` }
type PrometheusConfig ¶
type PrometheusConfig struct { AgentUrl string `key:"agentUrl" json:"agent_url"` AgentUsername string `key:"agentUsername" json:"agent_username"` AgentPassword string `key:"agentPassword" json:"agent_password"` ScrapeWorkers bool `key:"scrapeWorkers" json:"scrape_workers"` Port int `key:"port" json:"port"` }
type ProviderAgentConfig ¶
type ProviderAgentConfig struct {
ElasticSearch ElasticSearchConfig `key:"elasticSearch" json:"elastic_search"`
}
type ProviderComputeRequest ¶
type ProviderConfig ¶
type ProviderConfig struct { EC2 EC2ProviderConfig `key:"ec2" json:"ec2"` OCI OCIProviderConfig `key:"oci" json:"oci"` LambdaLabs LambdaLabsProviderConfig `key:"lambda" json:"lambda"` Crusoe CrusoeProviderConfig `key:"crusoe" json:"crusoe"` Hydra HydraProviderConfig `key:"hydra" json:"hydra"` Generic GenericProviderConfig `key:"generic" json:"generic"` }
type ProviderMachine ¶
type ProviderMachine struct { State *ProviderMachineState Metrics *ProviderMachineMetrics }
type ProviderMachineMetrics ¶
type ProviderMachineMetrics struct { TotalCpuAvailable int `json:"total_cpu_available" redis:"total_cpu_available"` TotalMemoryAvailable int `json:"total_memory_available" redis:"total_memory_available"` TotalDiskSpaceBytes int `json:"total_disk_space_bytes" redis:"total_disk_space_bytes"` CpuUtilizationPct float64 `json:"cpu_utilization_pct" redis:"cpu_utilization_pct"` MemoryUtilizationPct float64 `json:"memory_utilization_pct" redis:"memory_utilization_pct"` TotalDiskFreeBytes int `json:"total_disk_free_bytes" redis:"total_disk_free_bytes"` WorkerCount int `json:"worker_count" redis:"worker_count"` ContainerCount int `json:"container_count" redis:"container_count"` FreeGpuCount int `json:"free_gpu_count" redis:"free_gpu_count"` CacheUsagePct float64 `json:"cache_usage_pct" redis:"cache_usage_pct"` CacheCapacity int `json:"cache_capacity" redis:"cache_capacity"` CacheMemoryUsage int `json:"cache_memory_usage" redis:"cache_memory_usage"` CacheCpuUsage float64 `json:"cache_cpu_usage" redis:"cache_cpu_usage"` }
type ProviderMachineState ¶
type ProviderMachineState struct { MachineId string `json:"machine_id" redis:"machine_id"` PoolName string `json:"pool_name" redis:"pool_name"` Status MachineStatus `json:"status" redis:"status"` HostName string `json:"hostname" redis:"hostname"` Token string `json:"token" redis:"token"` Cpu int64 `json:"cpu" redis:"cpu"` Memory int64 `json:"memory" redis:"memory"` Gpu string `json:"gpu" redis:"gpu"` GpuCount uint32 `json:"gpu_count" redis:"gpu_count"` RegistrationToken string `json:"registration_token" redis:"registration_token"` Created string `json:"created" redis:"created"` LastWorkerSeen string `json:"last_worker_seen" redis:"last_worker_seen"` LastKeepalive string `json:"last_keepalive" redis:"last_keepalive"` AutoConsolidate bool `json:"auto_consolidate" redis:"auto_consolidate"` AgentVersion string `json:"agent_version" redis:"agent_version"` }
type ProviderNotImplemented ¶
type ProviderNotImplemented struct {
// contains filtered or unexported fields
}
func (*ProviderNotImplemented) Error ¶
func (e *ProviderNotImplemented) Error() string
type ProxyConfig ¶
type ProxyConfig struct { HTTPPort int `key:"httpPort" json:"http_port"` Services []InternalService `key:"services" json:"services"` }
type PythonStandaloneConfig ¶
type QueryFilter ¶
type QueryFilter struct { Field string Value interface{} }
type QuotaDoesNotExistError ¶
type QuotaDoesNotExistError struct{}
func (*QuotaDoesNotExistError) Error ¶
func (e *QuotaDoesNotExistError) Error() string
type RedisConfig ¶
type RedisConfig struct { Addrs []string `key:"addrs" json:"addrs"` Mode RedisMode `key:"mode" json:"mode"` ClientName string `key:"clientName" json:"client_name"` EnableTLS bool `key:"enableTLS" json:"enable_tls"` InsecureSkipVerify bool `key:"insecureSkipVerify" json:"insecure_skip_verify"` MinIdleConns int `key:"minIdleConns" json:"min_idle_conns"` MaxIdleConns int `key:"maxIdleConns" json:"max_idle_conns"` ConnMaxIdleTime time.Duration `key:"connMaxIdleTime" json:"conn_max_idle_time"` ConnMaxLifetime time.Duration `key:"connMaxLifetime" json:"conn_max_lifetime"` DialTimeout time.Duration `key:"dialTimeout" json:"dial_timeout"` ReadTimeout time.Duration `key:"readTimeout" json:"read_timeout"` WriteTimeout time.Duration `key:"writeTimeout" json:"write_timeout"` MaxRedirects int `key:"maxRedirects" json:"max_redirects"` MaxRetries int `key:"maxRetries" json:"max_retries"` PoolSize int `key:"poolSize" json:"pool_size"` Username string `key:"username" json:"username"` Password string `key:"password" json:"password"` RouteByLatency bool `key:"routeByLatency" json:"route_by_latency"` }
type RunnerConfig ¶
type RunnerConfig struct { BaseImageName string `key:"baseImageName" json:"base_image_name"` BaseImageRegistry string `key:"baseImageRegistry" json:"base_image_registry"` Tags map[string]string `key:"tags" json:"tags"` PythonStandalone PythonStandaloneConfig `key:"pythonStandalone" json:"python_standalone"` }
type S3ImageRegistryConfig ¶
type ScheduledJob ¶
type ScheduledJob struct { Id uint64 `db:"id"` ExternalId string `db:"external_id"` JobId uint64 `db:"job_id"` JobName string `db:"job_name"` Schedule string `db:"job_schedule"` Payload ScheduledJobPayload `db:"job_payload"` StubId uint `db:"stub_id"` DeploymentId uint `db:"deployment_id"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` DeletedAt sql.NullTime `db:"deleted_at"` }
type ScheduledJobPayload ¶
type ScheduledJobPayload struct { StubId string `json:"stub_id"` WorkspaceName string `json:"workspace_name"` TaskPayload TaskPayload `json:"task_payload"` }
func (*ScheduledJobPayload) Scan ¶
func (p *ScheduledJobPayload) Scan(value interface{}) error
type Secret ¶
type Secret struct { Id uint `db:"id" json:"-"` ExternalId string `db:"external_id" json:"external_id,omitempty"` CreatedAt time.Time `db:"created_at" json:"created_at,omitempty"` UpdatedAt time.Time `db:"updated_at" json:"updated_at,omitempty"` Name string `db:"name" json:"name"` Value string `db:"value" json:"value,omitempty"` WorkspaceId uint `db:"workspace_id" json:"workspace_id,omitempty"` LastUpdatedBy *uint `db:"last_updated_by" json:"last_updated_by,omitempty"` }
type StopContainerArgs ¶
type StopContainerArgs struct { ContainerId string `json:"container_id"` Force bool `json:"force"` }
func ToStopContainerArgs ¶
func ToStopContainerArgs(m map[string]any) (*StopContainerArgs, error)
type StorageConfig ¶
type StorageConfig struct { Mode string `key:"mode" json:"mode"` FilesystemName string `key:"fsName" json:"filesystem_name"` FilesystemPath string `key:"fsPath" json:"filesystem_path"` ObjectPath string `key:"objectPath" json:"object_path"` JuiceFS JuiceFSConfig `key:"juicefs" json:"juicefs"` CunoFS CunoFSConfig `key:"cunofs" json:"cunofs"` MountPoint MountPointConfig `key:"mountpoint" json:"mountpoint"` }
type StringSlice ¶
type StringSlice []string
Custom type for a slice of strings
func (*StringSlice) UnmarshalParam ¶
func (s *StringSlice) UnmarshalParam(src string) error
UnmarshalParam implements the echo query parameter unmarshaler interface
type Stub ¶
type Stub struct { Id uint `db:"id" json:"_"` ExternalId string `db:"external_id" json:"external_id"` Name string `db:"name" json:"name"` Type StubType `db:"type" json:"type"` Config string `db:"config" json:"config"` ConfigVersion uint `db:"config_version" json:"config_version"` ObjectId uint `db:"object_id" json:"object_id"` // Foreign key to Object WorkspaceId uint `db:"workspace_id" json:"workspace_id"` // Foreign key to Workspace CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
func (*Stub) SanitizeConfig ¶
func (*Stub) UnmarshalConfig ¶
func (s *Stub) UnmarshalConfig() (*StubConfigV1, error)
type StubConfigV1 ¶
type StubConfigV1 struct { Runtime Runtime `json:"runtime"` Handler string `json:"handler"` OnStart string `json:"on_start"` PythonVersion string `json:"python_version"` KeepWarmSeconds uint `json:"keep_warm_seconds"` MaxPendingTasks uint `json:"max_pending_tasks"` CallbackUrl string `json:"callback_url"` TaskPolicy TaskPolicy `json:"task_policy"` Workers uint `json:"workers"` ConcurrentRequests uint `json:"concurrent_requests"` Authorized bool `json:"authorized"` Volumes []*pb.Volume `json:"volumes"` Secrets []Secret `json:"secrets,omitempty"` Autoscaler *Autoscaler `json:"autoscaler"` Extra json.RawMessage `json:"extra"` }
type StubFilter ¶
type StubFilter struct { WorkspaceID string `query:"workspace_id"` StubIds StringSlice `query:"stub_ids"` // The query parameter name is "values" StubTypes StringSlice `query:"stub_types"` Cursor string `query:"cursor"` Pagination bool `query:"pagination"` }
Struct that includes the custom type
type StubGetURLFilter ¶
type StubLimits ¶
type StubWithRelated ¶
type TailscaleConfig ¶
type TailscaleConfig struct { ControlURL string `key:"controlUrl" json:"control_url"` User string `key:"user" json:"user"` AuthKey string `key:"authKey" json:"auth_key"` HostName string `key:"hostName" json:"host_name"` Enabled bool `key:"enabled" json:"enabled"` Debug bool `key:"debug" json:"debug"` }
type Task ¶
type Task struct { Id uint `db:"id" json:"id,omitempty"` ExternalId string `db:"external_id" json:"external_id,omitempty"` Status TaskStatus `db:"status" json:"status,omitempty"` ContainerId string `db:"container_id" json:"container_id,omitempty"` StartedAt sql.NullTime `db:"started_at" json:"started_at,omitempty"` EndedAt sql.NullTime `db:"ended_at" json:"ended_at,omitempty"` WorkspaceId uint `db:"workspace_id" json:"workspace_id,omitempty"` // Foreign key to Workspace StubId uint `db:"stub_id" json:"stub_id,omitempty"` // Foreign key to Stub CreatedAt time.Time `db:"created_at" json:"created_at,omitempty"` UpdatedAt time.Time `db:"updated_at" json:"updated_at,omitempty"` }
type TaskCancellationReason ¶
type TaskCancellationReason string
const ( TaskExpired TaskCancellationReason = "expired" TaskExceededRetryLimit TaskCancellationReason = "exceeded_retry_limit" TaskRequestCancelled TaskCancellationReason = "request_cancelled" )
type TaskCountByTime ¶
type TaskCountByTime struct { Time time.Time `db:"time" json:"time"` Count uint `count:"count" json:"count"` StatusCounts json.RawMessage `db:"status_counts" json:"status_counts"` }
type TaskCountPerDeployment ¶
type TaskExecutor ¶
type TaskExecutor string
var ( ExecutorTaskQueue TaskExecutor = "taskqueue" ExecutorEndpoint TaskExecutor = "endpoint" ExecutorFunction TaskExecutor = "function" ExecutorContainer TaskExecutor = "container" ExecutorBot TaskExecutor = "bot" )
type TaskFilter ¶
type TaskFilter struct { BaseFilter WorkspaceID uint `query:"workspace_id"` TaskIds StringSlice `query:"task_ids"` StubIds StringSlice `query:"stub_ids"` StubNames StringSlice `query:"stub_names"` StubTypes StringSlice `query:"stub_types"` Status string `query:"status"` ContainerIds StringSlice `query:"container_ids"` CreatedAtStart string `query:"created_at_start"` CreatedAtEnd string `query:"created_at_end"` MinDuration uint `query:"min_duration"` MaxDuration uint `query:"max_duration"` Interval string `query:"interval"` Cursor string `query:"cursor"` }
type TaskInterface ¶
type TaskMessage ¶
type TaskMessage struct { TaskId string `json:"task_id" redis:"task_id"` WorkspaceName string `json:"workspace_name" redis:"workspace_name"` StubId string `json:"stub_id" redis:"stub_id"` Executor string `json:"executor" redis:"executor"` Args []interface{} `json:"args" redis:"args"` Kwargs map[string]interface{} `json:"kwargs" redis:"kwargs"` Policy TaskPolicy `json:"policy" redis:"policy"` Retries uint `json:"retries" redis:"retries"` Timestamp int64 `json:"timestamp" redis:"timestamp"` }
TaskMessage represents a JSON serializable message to be added to the queue
func (*TaskMessage) Decode ¶
func (tm *TaskMessage) Decode(encodedData []byte) error
Decode initializes the TaskMessage fields from a byte array
func (*TaskMessage) Encode ¶
func (tm *TaskMessage) Encode() ([]byte, error)
Encode returns a binary representation of the TaskMessage
func (*TaskMessage) Reset ¶
func (tm *TaskMessage) Reset()
type TaskMetadata ¶
type TaskOutput ¶
type TaskParams ¶
type TaskPayload ¶
type TaskPayload struct { Args []interface{} `json:"args"` Kwargs map[string]interface{} `json:"kwargs"` }
type TaskPolicy ¶
type TaskStatus ¶
type TaskStatus string
const ( TaskStatusPending TaskStatus = "PENDING" TaskStatusRunning TaskStatus = "RUNNING" TaskStatusComplete TaskStatus = "COMPLETE" TaskStatusError TaskStatus = "ERROR" TaskStatusCancelled TaskStatus = "CANCELLED" TaskStatusExpired TaskStatus = "EXPIRED" TaskStatusTimeout TaskStatus = "TIMEOUT" TaskStatusRetry TaskStatus = "RETRY" )
func (TaskStatus) IsCompleted ¶
func (ts TaskStatus) IsCompleted() bool
type TaskWithRelated ¶
type TaskWithRelated struct { Task Deployment struct { ExternalId *string `db:"external_id" json:"external_id"` Name *string `db:"name" json:"name"` Version *uint `db:"version" json:"version"` } `db:"deployment" json:"deployment"` Outputs []TaskOutput `json:"outputs"` Stats TaskStats `json:"stats"` Workspace Workspace `db:"workspace" json:"workspace"` Stub Stub `db:"stub" json:"stub"` }
type TelemetryConfig ¶
type TelemetryConfig struct { Enabled bool `key:"enabled" json:"enabled"` Endpoint string `key:"endpoint" json:"endpoint"` MeterInterval time.Duration `key:"meterInterval" json:"meter_interval"` TraceInterval time.Duration `key:"traceInterval" json:"trace_interval"` TraceSampleRatio float64 `key:"traceSampleRatio" json:"trace_sample_ratio"` }
type ThrottledByConcurrencyLimitError ¶
type ThrottledByConcurrencyLimitError struct {
Reason string
}
func (*ThrottledByConcurrencyLimitError) Error ¶
func (e *ThrottledByConcurrencyLimitError) Error() string
type Token ¶
type Token struct { Id uint `db:"id" json:"id"` ExternalId string `db:"external_id" json:"external_id"` Key string `db:"key" json:"key"` Active bool `db:"active" json:"active"` Reusable bool `db:"reusable" json:"reusable"` WorkspaceId *uint `db:"workspace_id" json:"workspace_id,omitempty"` // Foreign key to Workspace Workspace *Workspace `db:"workspace" json:"workspace,omitempty"` // Pointer to associated Workspace TokenType string `db:"token_type" json:"token_type"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` DisabledByClusterAdmin bool `db:"disabled_by_cluster_admin" json:"disabled_by_cluster_admin"` }
type Volume ¶
type Volume struct { Id uint `db:"id" json:"id"` ExternalId string `db:"external_id" json:"external_id"` Name string `db:"name" json:"name"` Size uint64 `json:"size"` // Populated by volume abstraction WorkspaceId uint `db:"workspace_id" json:"workspace_id"` // Foreign key to Workspace CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
type VolumeWithRelated ¶
type Worker ¶
type Worker struct { Id string `json:"id" redis:"id"` Status WorkerStatus `json:"status" redis:"status"` TotalCpu int64 `json:"total_cpu" redis:"total_cpu"` TotalMemory int64 `json:"total_memory" redis:"total_memory"` TotalGpuCount uint32 `json:"total_gpu_count" redis:"total_gpu_count"` FreeCpu int64 `json:"free_cpu" redis:"free_cpu"` FreeMemory int64 `json:"free_memory" redis:"free_memory"` FreeGpuCount uint32 `json:"free_gpu_count" redis:"gpu_count"` Gpu string `json:"gpu" redis:"gpu"` PoolName string `json:"pool_name" redis:"pool_name"` MachineId string `json:"machine_id" redis:"machine_id"` ResourceVersion int64 `json:"resource_version" redis:"resource_version"` RequiresPoolSelector bool `json:"requires_pool_selector" redis:"requires_pool_selector"` Priority int32 `json:"priority" redis:"priority"` Preemptable bool `json:"preemptable" redis:"preemptable"` BuildVersion string `json:"build_version" redis:"build_version"` }
type WorkerConfig ¶
type WorkerConfig struct { Pools map[string]WorkerPoolConfig `key:"pools" json:"pools"` HostNetwork bool `key:"hostNetwork" json:"host_network"` UseGatewayServiceHostname bool `key:"useGatewayServiceHostname" json:"use_gateway_service_hostname"` UseHostResolvConf bool `key:"useHostResolvConf" json:"use_host_resolv_conf"` ImageTag string `key:"imageTag" json:"image_tag"` ImageName string `key:"imageName" json:"image_name"` ImageRegistry string `key:"imageRegistry" json:"image_registry"` ImagePullSecrets []string `key:"imagePullSecrets" json:"image_pull_secrets"` Namespace string `key:"namespace" json:"namespace"` ServiceAccountName string `key:"serviceAccountName" json:"service_account_name"` JobResourcesEnforced bool `key:"jobResourcesEnforced" json:"job_resources_enforced"` RunCResourcesEnforced bool `key:"runcResourcesEnforced" json:"runc_resources_enforced"` EagerCacheStubCode bool `key:"eagerCacheStubCode" json:"eager_cache_stub_code"` DefaultWorkerCPURequest int64 `key:"defaultWorkerCPURequest" json:"default_worker_cpu_request"` DefaultWorkerMemoryRequest int64 `key:"defaultWorkerMemoryRequest" json:"default_worker_memory_request"` ImagePVCName string `key:"imagePVCName" json:"image_pvc_name"` AddWorkerTimeout time.Duration `key:"addWorkerTimeout" json:"add_worker_timeout"` TerminationGracePeriod int64 `key:"terminationGracePeriod"` BlobCacheEnabled bool `key:"blobCacheEnabled" json:"blob_cache_enabled"` }
type WorkerPoolConfig ¶
type WorkerPoolConfig struct { GPUType string `key:"gpuType" json:"gpu_type"` Runtime string `key:"runtime" json:"runtime"` Mode PoolMode `key:"mode" json:"mode"` Provider *MachineProvider `key:"provider" json:"provider"` JobSpec WorkerPoolJobSpecConfig `key:"jobSpec" json:"job_spec"` PoolSizing WorkerPoolJobSpecPoolSizingConfig `key:"poolSizing" json:"pool_sizing"` DefaultMachineCost float64 `key:"defaultMachineCost" json:"default_machine_cost"` RequiresPoolSelector bool `key:"requiresPoolSelector" json:"requires_pool_selector"` Priority int32 `key:"priority" json:"priority"` Preemptable bool `key:"preemptable" json:"preemptable"` UserData string `key:"userData" json:"user_data"` }
type WorkerPoolJobSpecConfig ¶
type WorkerPoolJobSpecConfig struct { NodeSelector map[string]string `key:"nodeSelector" json:"node_selector"` Env []corev1.EnvVar `key:"env" json:"env"` // Mimics corev1.Volume since that type doesn't currently serialize correctly Volumes []struct { Name string `key:"name" json:"name"` Secret struct { SecretName string `key:"secretName" json:"secret_name"` } `key:"secret" json:"secret"` } `key:"volumes" json:"volumes"` VolumeMounts []corev1.VolumeMount `key:"volumeMounts" json:"volume_mounts"` }
type WorkerPoolJobSpecPoolSizingConfig ¶
type WorkerPoolJobSpecPoolSizingConfig struct { DefaultWorkerCPU string `key:"defaultWorkerCPU" json:"default_worker_cpu"` DefaultWorkerMemory string `key:"defaultWorkerMemory" json:"default_worker_memory"` DefaultWorkerGpuType string `key:"defaultWorkerGPUType" json:"default_worker_gpu_type"` DefaultWorkerGpuCount string `key:"defaultWorkerGpuCount" json:"default_worker_gpu_count"` MinFreeCPU string `key:"minFreeCPU" json:"min_free_cpu"` MinFreeMemory string `key:"minFreeMemory" json:"min_free_memory"` MinFreeGPU string `key:"minFreeGPU" json:"min_free_gpu"` }
type WorkerPoolSizingConfig ¶
type WorkerPoolSizingConfig struct { MinFreeCpu int64 MinFreeMemory int64 MinFreeGpu uint DefaultWorkerCpu int64 DefaultWorkerMemory int64 DefaultWorkerGpuType string DefaultWorkerGpuCount uint32 }
func NewWorkerPoolSizingConfig ¶
func NewWorkerPoolSizingConfig() *WorkerPoolSizingConfig
type WorkerStatus ¶
type WorkerStatus string
type Workspace ¶
type Workspace struct { Id uint `db:"id" json:"id,omitempty"` ExternalId string `db:"external_id" json:"external_id"` Name string `db:"name" json:"name"` CreatedAt time.Time `db:"created_at" json:"created_at,omitempty"` UpdatedAt time.Time `db:"updated_at" json:"updated_at,omitempty"` SigningKey *string `db:"signing_key" json:"signing_key"` VolumeCacheEnabled bool `db:"volume_cache_enabled" json:"volume_cache_enabled"` ConcurrencyLimitId *uint `db:"concurrency_limit_id" json:"concurrency_limit_id,omitempty"` ConcurrencyLimit *ConcurrencyLimit `db:"concurrency_limit" json:"concurrency_limit"` }
Click to show internal directories.
Click to hide internal directories.