apiv1

package
v0.0.0-...-f65cf3b Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HttpServerBaseRoute string = "/api/v1"
	HttpServerRootRoute string = ""
)

Variables

View Source
var DefaultTaskOutputExpirationS uint32 = 3600

Functions

func HTTPBadRequest

func HTTPBadRequest(message string) error

func HTTPConflict

func HTTPConflict(message string) error

func HTTPForbidden

func HTTPForbidden(message string) error

func HTTPInternalServerError

func HTTPInternalServerError(message string) error

func HTTPNotFound

func HTTPNotFound() error

func HTTPUnauthorized

func HTTPUnauthorized(message string) error

func NewHTTPError

func NewHTTPError(code int, message string) error

Types

type ClusterAdminTokensRequestSerializer

type ClusterAdminTokensRequestSerializer struct {
	Disabled bool `json:"enabled"`
}

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) CreateOrUpdateConcurrencyLimit

func (c *ConcurrencyLimitGroup) CreateOrUpdateConcurrencyLimit(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

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) 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 CreateWorkspaceRequest

type CreateWorkspaceRequest struct {
}

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) 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) *MachineGroup

func (*MachineGroup) GPUCounts

func (g *MachineGroup) GPUCounts(ctx echo.Context) error

func (*MachineGroup) RegisterMachine

func (g *MachineGroup) RegisterMachine(ctx echo.Context) error

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"`
}

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, config types.AppConfig) *StubGroup

func (*StubGroup) GetURL

func (g *StubGroup) GetURL(ctx echo.Context) error

func (*StubGroup) ListStubs

func (g *StubGroup) ListStubs(ctx echo.Context) error

func (*StubGroup) ListStubsByWorkspaceId

func (g *StubGroup) ListStubsByWorkspaceId(ctx echo.Context) error

func (*StubGroup) RetrieveStub

func (g *StubGroup) RetrieveStub(ctx echo.Context) error

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, config types.AppConfig) *TaskGroup

func (*TaskGroup) AggregateTasksByTimeWindow

func (g *TaskGroup) AggregateTasksByTimeWindow(ctx echo.Context) error

func (*TaskGroup) GetTaskCountByDeployment

func (g *TaskGroup) GetTaskCountByDeployment(ctx echo.Context) error

func (*TaskGroup) ListTasksPaginated

func (g *TaskGroup) ListTasksPaginated(ctx echo.Context) error

func (*TaskGroup) RetrieveTask

func (g *TaskGroup) RetrieveTask(ctx echo.Context) error

func (*TaskGroup) StopTasks

func (g *TaskGroup) StopTasks(ctx echo.Context) error

type TokenGroup

type TokenGroup struct {
	// contains filtered or unexported fields
}

func NewTokenGroup

func NewTokenGroup(g *echo.Group, backendRepo repository.BackendRepository, 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 WorkspaceGroup

type WorkspaceGroup struct {
	// contains filtered or unexported fields
}

func NewWorkspaceGroup

func NewWorkspaceGroup(g *echo.Group, backendRepo repository.BackendRepository, config types.AppConfig) *WorkspaceGroup

func (*WorkspaceGroup) CreateWorkspace

func (g *WorkspaceGroup) CreateWorkspace(ctx echo.Context) error

func (*WorkspaceGroup) CurrentWorkspace

func (g *WorkspaceGroup) CurrentWorkspace(ctx echo.Context) error

Jump to

Keyboard shortcuts

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