Documentation
¶
Index ¶
- Constants
- Variables
- func HTTPBadRequest(message string) error
- func HTTPConflict(message string) error
- func HTTPForbidden(message string) error
- func HTTPInternalServerError(message string) error
- func HTTPNotFound() error
- func HTTPUnauthorized(message string) error
- func NewHTTPError(code int, message string) error
- type AppGroup
- type AppWithLatestStubOrDeployment
- type ClusterAdminTokensRequestSerializer
- type CommonClients
- type ConcurrencyLimitGroup
- func (c *ConcurrencyLimitGroup) CreateConcurrencyLimit(ctx echo.Context) error
- func (c *ConcurrencyLimitGroup) DeleteConcurrencyLimit(ctx echo.Context) error
- func (c *ConcurrencyLimitGroup) GetConcurrencyLimitByWorkspaceId(ctx echo.Context) error
- func (c *ConcurrencyLimitGroup) ListConcurrencyLimitsByWorkspaceId(ctx echo.Context) error
- func (c *ConcurrencyLimitGroup) RevertConcurrencyLimit(ctx echo.Context) error
- type ContainerGroup
- func (c *ContainerGroup) GetContainer(ctx echo.Context) error
- func (c *ContainerGroup) GetContainerAsAdmin(ctx echo.Context) error
- func (c *ContainerGroup) ListContainersByWorkspaceId(ctx echo.Context) error
- func (c *ContainerGroup) StopAllWorkspaceContainers(ctx echo.Context) error
- func (c *ContainerGroup) StopContainer(ctx echo.Context) error
- type ContainerStateWithAppId
- type CreateWorkspaceRequest
- type CreateWorkspaceStorageRequest
- type DeploymentGroup
- func (g *DeploymentGroup) DeleteDeployment(ctx echo.Context) error
- func (g *DeploymentGroup) DownloadDeploymentPackage(ctx echo.Context) error
- func (g *DeploymentGroup) GetURL(ctx echo.Context) error
- func (g *DeploymentGroup) ListDeployments(ctx echo.Context) error
- func (g *DeploymentGroup) ListLatestDeployments(ctx echo.Context) error
- func (g *DeploymentGroup) RetrieveDeployment(ctx echo.Context) error
- func (g *DeploymentGroup) StartDeployment(ctx echo.Context) error
- func (g *DeploymentGroup) StopAllActiveDeployments(ctx echo.Context) error
- func (g *DeploymentGroup) StopDeployment(ctx echo.Context) error
- type HealthGroup
- type MachineGroup
- type OverrideStubConfig
- type RegisterMachineRequest
- type StopTasksRequest
- type StubGroup
- func (g *StubGroup) CloneStubPublic(ctx echo.Context) error
- func (g *StubGroup) GetConfig(ctx echo.Context) error
- func (g *StubGroup) GetURL(ctx echo.Context) error
- func (g *StubGroup) ListStubs(ctx echo.Context) error
- func (g *StubGroup) ListStubsByWorkspaceId(ctx echo.Context) error
- func (g *StubGroup) RetrieveStub(ctx echo.Context) error
- func (g *StubGroup) UpdateConfig(ctx echo.Context) error
- type TaskGroup
- func (g *TaskGroup) AggregateTasksByTimeWindow(ctx echo.Context) error
- func (g *TaskGroup) GetClusterTaskMetrics(ctx echo.Context) error
- func (g *TaskGroup) GetTaskCountByDeployment(ctx echo.Context) error
- func (g *TaskGroup) ListTasksPaginated(ctx echo.Context) error
- func (g *TaskGroup) RetrieveTask(ctx echo.Context) error
- func (g *TaskGroup) StopTasks(ctx echo.Context) error
- func (g *TaskGroup) SubscribeTask(ctx echo.Context) error
- type TokenGroup
- func (g *TokenGroup) ClusterAdminUpdateAllWorkspaceTokens(ctx echo.Context) error
- func (g *TokenGroup) CreateWorkspaceToken(ctx echo.Context) error
- func (g *TokenGroup) DeleteWorkspaceToken(ctx echo.Context) error
- func (g *TokenGroup) GetSigningKey(ctx echo.Context) error
- func (g *TokenGroup) ListWorkspaceTokens(ctx echo.Context) error
- func (g *TokenGroup) ToggleWorkspaceToken(ctx echo.Context) error
- type UpdateConfigRequest
- type WorkspaceConfigExport
- type WorkspaceGroup
- func (g *WorkspaceGroup) CreateWorkspace(ctx echo.Context) error
- func (g *WorkspaceGroup) CreateWorkspaceStorage(ctx echo.Context) error
- func (g *WorkspaceGroup) CurrentWorkspace(ctx echo.Context) error
- func (g *WorkspaceGroup) ExportWorkspaceConfig(ctx echo.Context) error
- func (g *WorkspaceGroup) SetExternalWorkspaceStorage(ctx echo.Context) error
Constants ¶
View Source
const ( HttpServerBaseRoute string = "/api/v1" HttpServerRootRoute string = "" )
Variables ¶
View Source
var ( DefaultTaskOutputExpirationS uint32 = 3600 DefaultTaskSubscribeIntervalS uint32 = 1 )
Functions ¶
func HTTPBadRequest ¶
func HTTPConflict ¶
func HTTPForbidden ¶
func HTTPInternalServerError ¶
func HTTPNotFound ¶
func HTTPNotFound() error
func HTTPUnauthorized ¶
func NewHTTPError ¶
Types ¶
type AppGroup ¶
type AppGroup struct {
// contains filtered or unexported fields
}
func NewAppGroup ¶
func NewAppGroup(g *echo.Group, backendRepo repository.BackendRepository, config types.AppConfig, containerRepo repository.ContainerRepository, scheduler scheduler.Scheduler, redisClient *common.RedisClient) *AppGroup
func (*AppGroup) ListAppWithLatestActivity ¶
type AppWithLatestStubOrDeployment ¶
type AppWithLatestStubOrDeployment struct {
types.App
Stub *types.StubWithRelated `json:"stub,omitempty" serializer:"stub"`
Deployment *types.DeploymentWithRelated `json:"deployment,omitempty" serializer:"deployment"`
}
type ClusterAdminTokensRequestSerializer ¶
type ClusterAdminTokensRequestSerializer struct {
Disabled bool `json:"disabled"`
}
type CommonClients ¶
type CommonClients struct {
// contains filtered or unexported fields
}
type ConcurrencyLimitGroup ¶
type ConcurrencyLimitGroup struct {
// contains filtered or unexported fields
}
func NewConcurrencyLimitGroup ¶
func NewConcurrencyLimitGroup( g *echo.Group, backendRepo repository.BackendRepository, workspaceRepo repository.WorkspaceRepository, ) *ConcurrencyLimitGroup
func (*ConcurrencyLimitGroup) CreateConcurrencyLimit ¶
func (c *ConcurrencyLimitGroup) CreateConcurrencyLimit(ctx echo.Context) error
func (*ConcurrencyLimitGroup) DeleteConcurrencyLimit ¶
func (c *ConcurrencyLimitGroup) DeleteConcurrencyLimit(ctx echo.Context) error
func (*ConcurrencyLimitGroup) GetConcurrencyLimitByWorkspaceId ¶
func (c *ConcurrencyLimitGroup) GetConcurrencyLimitByWorkspaceId(ctx echo.Context) error
func (*ConcurrencyLimitGroup) ListConcurrencyLimitsByWorkspaceId ¶
func (c *ConcurrencyLimitGroup) ListConcurrencyLimitsByWorkspaceId(ctx echo.Context) error
func (*ConcurrencyLimitGroup) RevertConcurrencyLimit ¶
func (c *ConcurrencyLimitGroup) RevertConcurrencyLimit(ctx echo.Context) error
type ContainerGroup ¶
type ContainerGroup struct {
// contains filtered or unexported fields
}
func NewContainerGroup ¶
func NewContainerGroup( g *echo.Group, backendRepo repository.BackendRepository, containerRepo repository.ContainerRepository, scheduler scheduler.Scheduler, config types.AppConfig, ) *ContainerGroup
func (*ContainerGroup) GetContainer ¶
func (c *ContainerGroup) GetContainer(ctx echo.Context) error
func (*ContainerGroup) GetContainerAsAdmin ¶
func (c *ContainerGroup) GetContainerAsAdmin(ctx echo.Context) error
func (*ContainerGroup) ListContainersByWorkspaceId ¶
func (c *ContainerGroup) ListContainersByWorkspaceId(ctx echo.Context) error
func (*ContainerGroup) StopAllWorkspaceContainers ¶
func (c *ContainerGroup) StopAllWorkspaceContainers(ctx echo.Context) error
func (*ContainerGroup) StopContainer ¶
func (c *ContainerGroup) StopContainer(ctx echo.Context) error
type ContainerStateWithAppId ¶
type ContainerStateWithAppId struct {
types.ContainerState
AppId string `json:"app_id"`
}
type CreateWorkspaceRequest ¶
type CreateWorkspaceRequest struct {
}
type CreateWorkspaceStorageRequest ¶
type CreateWorkspaceStorageRequest struct {
BucketName string `json:"bucket_name" validate:"required"`
AccessKey string `json:"access_key" validate:"required"`
SecretKey string `json:"secret_key" validate:"required"`
EndpointUrl string `json:"endpoint_url" validate:"required"`
Region string `json:"region" validate:"required"`
}
type DeploymentGroup ¶
type DeploymentGroup struct {
// contains filtered or unexported fields
}
func NewDeploymentGroup ¶
func NewDeploymentGroup( g *echo.Group, backendRepo repository.BackendRepository, containerRepo repository.ContainerRepository, scheduler scheduler.Scheduler, redisClient *common.RedisClient, config types.AppConfig, ) *DeploymentGroup
func (*DeploymentGroup) DeleteDeployment ¶
func (g *DeploymentGroup) DeleteDeployment(ctx echo.Context) error
func (*DeploymentGroup) DownloadDeploymentPackage ¶
func (g *DeploymentGroup) DownloadDeploymentPackage(ctx echo.Context) error
func (*DeploymentGroup) ListDeployments ¶
func (g *DeploymentGroup) ListDeployments(ctx echo.Context) error
func (*DeploymentGroup) ListLatestDeployments ¶
func (g *DeploymentGroup) ListLatestDeployments(ctx echo.Context) error
func (*DeploymentGroup) RetrieveDeployment ¶
func (g *DeploymentGroup) RetrieveDeployment(ctx echo.Context) error
func (*DeploymentGroup) StartDeployment ¶
func (g *DeploymentGroup) StartDeployment(ctx echo.Context) error
func (*DeploymentGroup) StopAllActiveDeployments ¶
func (g *DeploymentGroup) StopAllActiveDeployments(ctx echo.Context) error
func (*DeploymentGroup) StopDeployment ¶
func (g *DeploymentGroup) StopDeployment(ctx echo.Context) error
type HealthGroup ¶
type HealthGroup struct {
// contains filtered or unexported fields
}
func NewHealthGroup ¶
func NewHealthGroup(g *echo.Group, rdb *common.RedisClient, backendRepo repository.BackendRepository) *HealthGroup
func (*HealthGroup) HealthCheck ¶
func (h *HealthGroup) HealthCheck(c echo.Context) error
type MachineGroup ¶
type MachineGroup struct {
// contains filtered or unexported fields
}
func NewMachineGroup ¶
func NewMachineGroup(g *echo.Group, providerRepo repository.ProviderRepository, tailscale *network.Tailscale, config types.AppConfig, workerRepo repository.WorkerRepository) *MachineGroup
func (*MachineGroup) ListPoolMachines ¶
func (g *MachineGroup) ListPoolMachines(ctx echo.Context) error
func (*MachineGroup) RegisterMachine ¶
func (g *MachineGroup) RegisterMachine(ctx echo.Context) error
type OverrideStubConfig ¶
type RegisterMachineRequest ¶
type RegisterMachineRequest struct {
Token string `json:"token"`
MachineID string `json:"machine_id"`
HostName string `json:"hostname"`
ProviderName string `json:"provider_name"`
PoolName string `json:"pool_name"`
Cpu string `json:"cpu"`
Memory string `json:"memory"`
GpuCount string `json:"gpu_count"`
PrivateIP string `json:"private_ip"`
}
type StopTasksRequest ¶
type StopTasksRequest struct {
TaskIds types.StringSlice `query:"task_ids"`
}
type StubGroup ¶
type StubGroup struct {
// contains filtered or unexported fields
}
func NewStubGroup ¶
func NewStubGroup(g *echo.Group, backendRepo repository.BackendRepository, eventRepo repository.EventRepository, config types.AppConfig) *StubGroup
func (*StubGroup) ListStubsByWorkspaceId ¶
type TaskGroup ¶
type TaskGroup struct {
// contains filtered or unexported fields
}
func NewTaskGroup ¶
func NewTaskGroup(g *echo.Group, redisClient *common.RedisClient, taskRepo repository.TaskRepository, containerRepo repository.ContainerRepository, backendRepo repository.BackendRepository, taskDispatcher *task.Dispatcher, scheduler *scheduler.Scheduler, config types.AppConfig) *TaskGroup
func (*TaskGroup) AggregateTasksByTimeWindow ¶
func (*TaskGroup) GetClusterTaskMetrics ¶
func (*TaskGroup) GetTaskCountByDeployment ¶
func (*TaskGroup) ListTasksPaginated ¶
type TokenGroup ¶
type TokenGroup struct {
// contains filtered or unexported fields
}
func NewTokenGroup ¶
func NewTokenGroup(g *echo.Group, backendRepo repository.BackendRepository, workspaceRepo repository.WorkspaceRepository, config types.AppConfig) *TokenGroup
func (*TokenGroup) ClusterAdminUpdateAllWorkspaceTokens ¶
func (g *TokenGroup) ClusterAdminUpdateAllWorkspaceTokens(ctx echo.Context) error
func (*TokenGroup) CreateWorkspaceToken ¶
func (g *TokenGroup) CreateWorkspaceToken(ctx echo.Context) error
func (*TokenGroup) DeleteWorkspaceToken ¶
func (g *TokenGroup) DeleteWorkspaceToken(ctx echo.Context) error
func (*TokenGroup) GetSigningKey ¶
func (g *TokenGroup) GetSigningKey(ctx echo.Context) error
func (*TokenGroup) ListWorkspaceTokens ¶
func (g *TokenGroup) ListWorkspaceTokens(ctx echo.Context) error
func (*TokenGroup) ToggleWorkspaceToken ¶
func (g *TokenGroup) ToggleWorkspaceToken(ctx echo.Context) error
type UpdateConfigRequest ¶
type UpdateConfigRequest struct {
Fields map[string]interface{} `json:"fields"` // Map of field paths to values (e.g., {"runtime.cpu": 4, "runtime.memory": 8192})
}
type WorkspaceConfigExport ¶
type WorkspaceConfigExport struct {
GatewayHTTPHost string `json:"gateway_http_host"`
GatewayHTTPPort int `json:"gateway_http_port"`
GatewayHTTPTLS bool `json:"gateway_http_tls"`
GatewayGRPCHost string `json:"gateway_grpc_host"`
GatewayGRPCPort int `json:"gateway_grpc_port"`
GatewayGRPCTLS bool `json:"gateway_grpc_tls"`
WorkspaceID string `json:"workspace_id"`
Token string `json:"token"`
}
type WorkspaceGroup ¶
type WorkspaceGroup struct {
// contains filtered or unexported fields
}
func NewWorkspaceGroup ¶
func NewWorkspaceGroup(g *echo.Group, backendRepo repository.BackendRepository, workspaceRepo repository.WorkspaceRepository, defaultStorageClient *clients.StorageClient, config types.AppConfig) *WorkspaceGroup
func (*WorkspaceGroup) CreateWorkspace ¶
func (g *WorkspaceGroup) CreateWorkspace(ctx echo.Context) error
func (*WorkspaceGroup) CreateWorkspaceStorage ¶
func (g *WorkspaceGroup) CreateWorkspaceStorage(ctx echo.Context) error
CreateWorkspaceStorage creates a new bucket in the configured default storage provider. It then creates a new workspace storage object for that bucket and sets it as the storage bucket for the workspace.
func (*WorkspaceGroup) CurrentWorkspace ¶
func (g *WorkspaceGroup) CurrentWorkspace(ctx echo.Context) error
func (*WorkspaceGroup) ExportWorkspaceConfig ¶
func (g *WorkspaceGroup) ExportWorkspaceConfig(ctx echo.Context) error
func (*WorkspaceGroup) SetExternalWorkspaceStorage ¶
func (g *WorkspaceGroup) SetExternalWorkspaceStorage(ctx echo.Context) error
SetExternalWorkspaceStorage takes in the details for accessing an external s3 compatible storage bucket. This includes: - Bucket name - Access key - Secret key - Endpoint URL - Region It then creates a new workspace storage object for that bucket and sets it as the storage bucket for the workspace.
Click to show internal directories.
Click to hide internal directories.