Documentation
¶
Index ¶
- func AWSBYOCTemplate() string
- type ManagedMachineBootstrap
- type Options
- type Service
- func (s *Service) ActivateMachineSSHKey(ctx context.Context, in *pb.ActivateMachineSSHKeyRequest) (*pb.ActivateMachineSSHKeyResponse, error)
- func (s *Service) CreateBYOCPool(ctx context.Context, in *pb.CreateBYOCPoolRequest) (*pb.CreateBYOCPoolResponse, error)
- func (s *Service) CreateManagedMachine(ctx context.Context, authInfo *auth.AuthInfo, poolName string) (*ManagedMachineBootstrap, error)
- func (s *Service) CreateManagedPool(ctx context.Context, authInfo *auth.AuthInfo, name string, ...) (*model.ManagedPool, error)
- func (s *Service) CreatePool(ctx context.Context, in *pb.CreatePoolRequest) (*pb.CreatePoolResponse, error)
- func (s *Service) CreatePoolJoinToken(ctx context.Context, in *pb.CreatePoolJoinTokenRequest) (*pb.CreatePoolJoinTokenResponse, error)
- func (s *Service) DeleteManagedMachine(ctx context.Context, authInfo *auth.AuthInfo, poolName, machineID string) error
- func (s *Service) DeleteManagedPool(ctx context.Context, authInfo *auth.AuthInfo, name string) error
- func (s *Service) DeletePool(ctx context.Context, in *pb.DeletePoolRequest) (*pb.DeletePoolResponse, error)
- func (s *Service) DeletePrivateMachine(ctx context.Context, in *pb.DeleteMachineRequest) (*pb.DeleteMachineResponse, error)
- func (s *Service) DownloadMachineSSHKey(ctx context.Context, in *pb.DownloadMachineSSHKeyRequest) (*pb.DownloadMachineSSHKeyResponse, error)
- func (s *Service) ExtendPoolCapacity(ctx context.Context, in *pb.ExtendPoolCapacityRequest) (*pb.ExtendPoolCapacityResponse, error)
- func (s *Service) FindReadyPrivatePoolForGPU(ctx context.Context, workspaceID string, gpus []types.GpuType) (string, error)
- func (s *Service) GetAgentPoolVirtualization(ctx context.Context, in *pb.GetAgentPoolVirtualizationRequest) (*pb.GetAgentPoolVirtualizationResponse, error)
- func (s *Service) GetBYOCPool(ctx context.Context, in *pb.GetBYOCPoolRequest) (*pb.GetBYOCPoolResponse, error)
- func (s *Service) GetPoolJoinCommand(ctx context.Context, in *pb.GetPoolJoinCommandRequest) (*pb.GetPoolJoinCommandResponse, error)
- func (s *Service) GetProviderJoinCommand(ctx context.Context, in *pb.GetProviderJoinCommandRequest) (*pb.GetProviderJoinCommandResponse, error)
- func (s *Service) JoinAgent(ctx context.Context, in *pb.JoinAgentRequest) (*pb.JoinAgentResponse, error)
- func (s *Service) LaunchPoolCapacity(ctx context.Context, in *pb.LaunchPoolCapacityRequest) (*pb.LaunchPoolCapacityResponse, error)
- func (s *Service) ListMachineContainers(ctx context.Context, in *pb.ListMachineContainersRequest) (*pb.ListMachineContainersResponse, error)
- func (s *Service) ListManagedMachines(ctx context.Context, authInfo *auth.AuthInfo, poolName string) ([]*pb.Machine, error)
- func (s *Service) ListManagedPools(ctx context.Context, authInfo *auth.AuthInfo) ([]*model.ManagedPool, error)
- func (s *Service) ListPoolMachines(ctx context.Context, in *pb.ListPoolMachinesRequest) (*pb.ListPoolMachinesResponse, error)
- func (s *Service) ListPoolOffers(ctx context.Context, in *pb.ListPoolOffersRequest) (*pb.ListPoolOffersResponse, error)
- func (s *Service) ListPrivateMachines(ctx context.Context, authInfo *auth.AuthInfo, poolName string, limit int) ([]*pb.Machine, error)
- func (s *Service) ListPrivatePools(ctx context.Context, in *pb.ListPrivatePoolsRequest) (*pb.ListPrivatePoolsResponse, error)
- func (s *Service) ListProviderMachines(ctx context.Context, in *pb.ListProviderMachinesRequest) (*pb.ListProviderMachinesResponse, error)
- func (s *Service) MissingPrivatePoolGPUWarning(ctx context.Context, workspaceID string, gpus []types.GpuType) (string, error)
- func (s *Service) ReconcileManagedCompute(ctx context.Context) error
- func (s *Service) ReconcileManagedPools(ctx context.Context) error
- func (s *Service) RequestAgentTransportCredential(ctx context.Context, in *pb.RequestAgentTransportCredentialRequest) (*pb.RequestAgentTransportCredentialResponse, error)
- func (s *Service) RequestAgentWorkerRestart(ctx context.Context, worker *types.Worker) error
- func (s *Service) ResolveAgentState(ctx context.Context, token string) (*model.AgentTokenState, error)
- func (s *Service) RevokePoolJoinToken(ctx context.Context, in *pb.RevokePoolJoinTokenRequest) (*pb.RevokePoolJoinTokenResponse, error)
- func (s *Service) RotateMachineSSHKey(ctx context.Context, in *pb.RotateMachineSSHKeyRequest) (*pb.RotateMachineSSHKeyResponse, error)
- func (s *Service) ScaleBYOCPool(ctx context.Context, in *pb.ScaleBYOCPoolRequest) (*pb.ScaleBYOCPoolResponse, error)
- func (s *Service) SetAgentWorkerCordon(ctx context.Context, worker *types.Worker, cordoned bool) (bool, error)
- func (s *Service) Start(ctx context.Context)
- func (s *Service) StreamAgent(in *pb.StreamAgentRequest, stream pb.GatewayService_StreamAgentServer) error
- func (s *Service) StreamAgentTelemetry(stream pb.GatewayService_StreamAgentTelemetryServer) error
- func (s *Service) UpdateAgentAvailability(ctx context.Context, in *pb.UpdateAgentAvailabilityRequest) (*pb.UpdateAgentAvailabilityResponse, error)
- func (s *Service) UpdateAgentRouteStatus(ctx context.Context, in *pb.UpdateAgentRouteStatusRequest) (*pb.UpdateAgentRouteStatusResponse, error)
- func (s *Service) UpdateAgentSSHStatus(ctx context.Context, in *pb.UpdateAgentSSHStatusRequest) (*pb.UpdateAgentSSHStatusResponse, error)
- func (s *Service) UpdateManagedPool(ctx context.Context, authInfo *auth.AuthInfo, name string, ...) (*model.ManagedPool, error)
- func (s *Service) ValidatePrivatePoolGPURequest(ctx context.Context, workspaceID, poolName string, gpus []types.GpuType) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AWSBYOCTemplate ¶
func AWSBYOCTemplate() string
Types ¶
type ManagedMachineBootstrap ¶
type Options ¶
type Options struct {
Config types.AppConfig
BackendRepo repository.BackendRepository
WorkspaceRepo repository.WorkspaceRepository
ContainerRepo repository.ContainerRepository
Scheduler *scheduler.Scheduler
EventRepo repository.EventRepository
WorkerRepo repository.WorkerRepository
WorkerPoolRepo repository.WorkerPoolRepository
UsageMetricsRepo repository.UsageMetricsRepository
ComputeRepo repository.ComputeRepository
ManagedPoolRepo repository.ManagedPoolRepository
KeyEventManager *common.KeyEventManager
RedisClient *common.RedisClient
Tailscale *network.Tailscale
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) ActivateMachineSSHKey ¶
func (s *Service) ActivateMachineSSHKey(ctx context.Context, in *pb.ActivateMachineSSHKeyRequest) (*pb.ActivateMachineSSHKeyResponse, error)
func (*Service) CreateBYOCPool ¶
func (s *Service) CreateBYOCPool(ctx context.Context, in *pb.CreateBYOCPoolRequest) (*pb.CreateBYOCPoolResponse, error)
func (*Service) CreateManagedMachine ¶
func (*Service) CreateManagedPool ¶
func (*Service) CreatePool ¶
func (s *Service) CreatePool(ctx context.Context, in *pb.CreatePoolRequest) (*pb.CreatePoolResponse, error)
func (*Service) CreatePoolJoinToken ¶
func (s *Service) CreatePoolJoinToken(ctx context.Context, in *pb.CreatePoolJoinTokenRequest) (*pb.CreatePoolJoinTokenResponse, error)
func (*Service) DeleteManagedMachine ¶
func (*Service) DeleteManagedPool ¶
func (*Service) DeletePool ¶
func (s *Service) DeletePool(ctx context.Context, in *pb.DeletePoolRequest) (*pb.DeletePoolResponse, error)
func (*Service) DeletePrivateMachine ¶
func (s *Service) DeletePrivateMachine(ctx context.Context, in *pb.DeleteMachineRequest) (*pb.DeleteMachineResponse, error)
func (*Service) DownloadMachineSSHKey ¶
func (s *Service) DownloadMachineSSHKey(ctx context.Context, in *pb.DownloadMachineSSHKeyRequest) (*pb.DownloadMachineSSHKeyResponse, error)
func (*Service) ExtendPoolCapacity ¶
func (s *Service) ExtendPoolCapacity(ctx context.Context, in *pb.ExtendPoolCapacityRequest) (*pb.ExtendPoolCapacityResponse, error)
func (*Service) FindReadyPrivatePoolForGPU ¶
func (s *Service) FindReadyPrivatePoolForGPU(ctx context.Context, workspaceID string, gpus []types.GpuType) (string, error)
FindReadyPrivatePoolForGPU returns the name of a private pool in the workspace that is configured for one of the requested GPU types and has at least one connected machine. It lets stub creation route "no managed capacity" workloads onto capacity the user already owns.
func (*Service) GetAgentPoolVirtualization ¶
func (s *Service) GetAgentPoolVirtualization(ctx context.Context, in *pb.GetAgentPoolVirtualizationRequest) (*pb.GetAgentPoolVirtualizationResponse, error)
func (*Service) GetBYOCPool ¶
func (s *Service) GetBYOCPool(ctx context.Context, in *pb.GetBYOCPoolRequest) (*pb.GetBYOCPoolResponse, error)
func (*Service) GetPoolJoinCommand ¶
func (s *Service) GetPoolJoinCommand(ctx context.Context, in *pb.GetPoolJoinCommandRequest) (*pb.GetPoolJoinCommandResponse, error)
func (*Service) GetProviderJoinCommand ¶
func (s *Service) GetProviderJoinCommand(ctx context.Context, in *pb.GetProviderJoinCommandRequest) (*pb.GetProviderJoinCommandResponse, error)
GetProviderJoinCommand ensures the workspace's provider pool for the GPU type exists and mints a join token for a new machine.
func (*Service) JoinAgent ¶
func (s *Service) JoinAgent(ctx context.Context, in *pb.JoinAgentRequest) (*pb.JoinAgentResponse, error)
func (*Service) LaunchPoolCapacity ¶
func (s *Service) LaunchPoolCapacity(ctx context.Context, in *pb.LaunchPoolCapacityRequest) (*pb.LaunchPoolCapacityResponse, error)
func (*Service) ListMachineContainers ¶
func (s *Service) ListMachineContainers(ctx context.Context, in *pb.ListMachineContainersRequest) (*pb.ListMachineContainersResponse, error)
ListMachineContainers lists the active containers scheduled on one machine. Works for private and provider pools alike — both are stored under the owning workspace, so providers can see what runs on their hardware.
func (*Service) ListManagedMachines ¶
func (*Service) ListManagedPools ¶
func (*Service) ListPoolMachines ¶
func (s *Service) ListPoolMachines(ctx context.Context, in *pb.ListPoolMachinesRequest) (*pb.ListPoolMachinesResponse, error)
func (*Service) ListPoolOffers ¶
func (s *Service) ListPoolOffers(ctx context.Context, in *pb.ListPoolOffersRequest) (*pb.ListPoolOffersResponse, error)
func (*Service) ListPrivateMachines ¶
func (s *Service) ListPrivateMachines(ctx context.Context, authInfo *auth.AuthInfo, poolName string, limit int) ([]*pb.Machine, error)
ListPrivateMachines lists private and BYOC inventory in one workspace.
func (*Service) ListPrivatePools ¶
func (s *Service) ListPrivatePools(ctx context.Context, in *pb.ListPrivatePoolsRequest) (*pb.ListPrivatePoolsResponse, error)
func (*Service) ListProviderMachines ¶
func (s *Service) ListProviderMachines(ctx context.Context, in *pb.ListProviderMachinesRequest) (*pb.ListProviderMachinesResponse, error)
ListProviderMachines lists every machine the workspace has contributed, across its provider pools.
func (*Service) MissingPrivatePoolGPUWarning ¶
func (*Service) ReconcileManagedCompute ¶
func (*Service) ReconcileManagedPools ¶
ReconcileManagedPools converges this replica's in-memory scheduler with the isolated managed-pool definitions in Redis. The distributed repository lock protects definitions; every replica still performs its own local hydration.
func (*Service) RequestAgentTransportCredential ¶
func (s *Service) RequestAgentTransportCredential(ctx context.Context, in *pb.RequestAgentTransportCredentialRequest) (*pb.RequestAgentTransportCredentialResponse, error)
func (*Service) RequestAgentWorkerRestart ¶
RequestAgentWorkerRestart cordons a worker and changes its desired generation. Reconciliation publishes it after all outstanding work has drained.
func (*Service) ResolveAgentState ¶
func (s *Service) ResolveAgentState(ctx context.Context, token string) (*model.AgentTokenState, error)
ResolveAgentState resolves an agent token to its current machine state.
func (*Service) RevokePoolJoinToken ¶
func (s *Service) RevokePoolJoinToken(ctx context.Context, in *pb.RevokePoolJoinTokenRequest) (*pb.RevokePoolJoinTokenResponse, error)
func (*Service) RotateMachineSSHKey ¶
func (s *Service) RotateMachineSSHKey(ctx context.Context, in *pb.RotateMachineSSHKeyRequest) (*pb.RotateMachineSSHKeyResponse, error)
func (*Service) ScaleBYOCPool ¶
func (s *Service) ScaleBYOCPool(ctx context.Context, in *pb.ScaleBYOCPoolRequest) (*pb.ScaleBYOCPoolResponse, error)
func (*Service) SetAgentWorkerCordon ¶
func (s *Service) SetAgentWorkerCordon(ctx context.Context, worker *types.Worker, cordoned bool) (bool, error)
SetAgentWorkerCordon persists operator intent on every agent-managed machine so a worker TTL expiry or agent reconnect cannot silently undo a cordon.
func (*Service) StreamAgent ¶
func (s *Service) StreamAgent(in *pb.StreamAgentRequest, stream pb.GatewayService_StreamAgentServer) error
func (*Service) StreamAgentTelemetry ¶
func (s *Service) StreamAgentTelemetry(stream pb.GatewayService_StreamAgentTelemetryServer) error
func (*Service) UpdateAgentAvailability ¶
func (s *Service) UpdateAgentAvailability(ctx context.Context, in *pb.UpdateAgentAvailabilityRequest) (*pb.UpdateAgentAvailabilityResponse, error)
func (*Service) UpdateAgentRouteStatus ¶
func (s *Service) UpdateAgentRouteStatus(ctx context.Context, in *pb.UpdateAgentRouteStatusRequest) (*pb.UpdateAgentRouteStatusResponse, error)
func (*Service) UpdateAgentSSHStatus ¶
func (s *Service) UpdateAgentSSHStatus(ctx context.Context, in *pb.UpdateAgentSSHStatusRequest) (*pb.UpdateAgentSSHStatusResponse, error)