Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureDriveWithTimeout ¶
func EnsureDriveWithTimeout(dm DriveManager, workspaceID, namespace string) (string, error)
EnsureDriveWithTimeout wraps EnsureDrive with a default timeout.
Types ¶
type DockerDriveAdapter ¶
type DockerDriveAdapter struct {
// contains filtered or unexported fields
}
DockerDriveAdapter adapts DockerWorkspaceDriveManager to the DriveManager interface.
func (*DockerDriveAdapter) EnsureDrive ¶
type DockerWorkspaceDriveManager ¶
type DockerWorkspaceDriveManager struct {
// contains filtered or unexported fields
}
DockerWorkspaceDriveManager handles workspace Docker volume creation.
func NewDockerWorkspaceDriveManager ¶
func NewDockerWorkspaceDriveManager(database *db.DB) *DockerWorkspaceDriveManager
NewDockerWorkspaceDriveManager creates a Docker-backed workspace drive manager.
func (*DockerWorkspaceDriveManager) EnsureVolume ¶
func (m *DockerWorkspaceDriveManager) EnsureVolume(workspaceID string) (string, error)
EnsureVolume ensures a Docker named volume exists for the workspace.
type DriveManager ¶
type DriveManager interface {
EnsureDrive(ctx context.Context, workspaceID, namespace string) (string, error)
}
DriveManager is a backend-agnostic interface for workspace drive management.
func NewDockerDriveAdapter ¶
func NewDockerDriveAdapter(mgr *DockerWorkspaceDriveManager) DriveManager
func NewK8sDriveAdapter ¶
func NewK8sDriveAdapter(mgr *WorkspaceDriveManager) DriveManager
type K8sDriveAdapter ¶
type K8sDriveAdapter struct {
// contains filtered or unexported fields
}
K8sDriveAdapter adapts WorkspaceDriveManager to the DriveManager interface.
func (*K8sDriveAdapter) EnsureDrive ¶
type NilDriveManager ¶
type NilDriveManager struct{}
NilDriveManager is a no-op drive manager for when storage is not configured.
func (NilDriveManager) EnsureDrive ¶
type WorkspaceDriveManager ¶
type WorkspaceDriveManager struct {
// contains filtered or unexported fields
}
WorkspaceDriveManager handles workspace persistent volume creation.
func NewWorkspaceDriveManager ¶
func NewWorkspaceDriveManager(database *db.DB, clientset kubernetes.Interface, storageSize, storageClassName string) *WorkspaceDriveManager
NewWorkspaceDriveManager creates a K8s-backed workspace drive manager.