Documentation ¶
Index ¶
- type Container
- type ContainerManager
- type ContainerStatus
- type ContainerWorkspace
- func (c ContainerWorkspace) CreateNew(ctx context.Context) error
- func (c ContainerWorkspace) CreateVolumes(ctx context.Context) error
- func (c ContainerWorkspace) DeleteVolumes(ctx context.Context) error
- func (c ContainerWorkspace) Rebuild(ctx context.Context) error
- func (c ContainerWorkspace) Reset(ctx context.Context) error
- func (c ContainerWorkspace) Start(ctx context.Context) error
- func (c ContainerWorkspace) StartFromStopped(ctx context.Context) error
- func (c ContainerWorkspace) Stop(ctx context.Context) error
- type CreateContainerOptions
- type DockerContainerManager
- func (c DockerContainerManager) CreateContainer(ctx context.Context, options CreateContainerOptions, image string) (string, error)
- func (c DockerContainerManager) DeleteContainer(ctx context.Context, containerIdentifier string) error
- func (c DockerContainerManager) DeleteVolume(ctx context.Context, volumeName string) error
- func (c DockerContainerManager) GetContainer(ctx context.Context, containerIdentifier string) (*Container, error)
- func (c DockerContainerManager) StartContainer(ctx context.Context, containerIdentifier string) error
- func (c DockerContainerManager) StopContainer(ctx context.Context, containerIdentifier string) error
- type DynamicVolume
- func (s DynamicVolume) GetIdentifier() string
- func (s DynamicVolume) GetMountFromPath() string
- func (s DynamicVolume) GetMountToPath() string
- func (s DynamicVolume) Setup(_ context.Context) error
- func (s DynamicVolume) Teardown(_ context.Context) error
- func (s DynamicVolume) WithPathPrefix(prefix string) DynamicVolume
- type SimpleVolume
- type StaticFiles
- func (s StaticFiles) GetIdentifier() string
- func (s StaticFiles) GetMountFromPath() string
- func (s StaticFiles) GetMountToPath() string
- func (s StaticFiles) Setup(_ context.Context) error
- func (s StaticFiles) Teardown(_ context.Context) error
- func (s StaticFiles) WithPathPrefix(prefix string) StaticFiles
- type SymLinkVolume
- type Volume
- type WorkspaceManager
- func (w WorkspaceManager) MakeContainerWorkspace(workspaceID string) (*ContainerWorkspace, error)
- func (w WorkspaceManager) Reset(ctx context.Context, workspaceID string) error
- func (w WorkspaceManager) Start(ctx context.Context, workspaceID string) error
- func (w WorkspaceManager) Stop(ctx context.Context, workspaceID string) error
- type WorkspaceManagerStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { ID string Status ContainerStatus }
type ContainerManager ¶
type ContainerManager interface { GetContainer(ctx context.Context, containerID string) (*Container, error) StopContainer(ctx context.Context, containerID string) error DeleteContainer(ctx context.Context, containerID string) error CreateContainer(ctx context.Context, options CreateContainerOptions, image string) (string, error) StartContainer(ctx context.Context, containerID string) error DeleteVolume(ctx context.Context, volumeName string) error }
ContainerManager Interface for docker, podman etc.
type ContainerStatus ¶
type ContainerStatus string
const ( ContainerRunning ContainerStatus = "running" ContainerStopped ContainerStatus = "stopped" )
func DockerStatusToContainerStatus ¶
func DockerStatusToContainerStatus(status string) ContainerStatus
type ContainerWorkspace ¶
type ContainerWorkspace struct { ContainerManager ContainerManager Identifier string Image string Volumes []Volume }
func NewContainerWorkspace ¶
func NewContainerWorkspace(cm ContainerManager, identifier string, image string, volumes []Volume) *ContainerWorkspace
func (ContainerWorkspace) CreateNew ¶
func (c ContainerWorkspace) CreateNew(ctx context.Context) error
func (ContainerWorkspace) CreateVolumes ¶
func (c ContainerWorkspace) CreateVolumes(ctx context.Context) error
func (ContainerWorkspace) DeleteVolumes ¶
func (c ContainerWorkspace) DeleteVolumes(ctx context.Context) error
func (ContainerWorkspace) StartFromStopped ¶
func (c ContainerWorkspace) StartFromStopped(ctx context.Context) error
type CreateContainerOptions ¶
type DockerContainerManager ¶
type DockerContainerManager struct{}
func (DockerContainerManager) CreateContainer ¶
func (c DockerContainerManager) CreateContainer(ctx context.Context, options CreateContainerOptions, image string) (string, error)
func (DockerContainerManager) DeleteContainer ¶
func (c DockerContainerManager) DeleteContainer(ctx context.Context, containerIdentifier string) error
func (DockerContainerManager) DeleteVolume ¶
func (c DockerContainerManager) DeleteVolume(ctx context.Context, volumeName string) error
func (DockerContainerManager) GetContainer ¶
func (DockerContainerManager) StartContainer ¶
func (c DockerContainerManager) StartContainer(ctx context.Context, containerIdentifier string) error
func (DockerContainerManager) StopContainer ¶
func (c DockerContainerManager) StopContainer(ctx context.Context, containerIdentifier string) error
type DynamicVolume ¶
type DynamicVolume struct { FromMountPathPrefix string ToMountPath string FileMap map[string]func(string) }
func NewDynamicVolume ¶
func NewDynamicVolume(path string, fileMap map[string]func(string)) *DynamicVolume
func (DynamicVolume) GetIdentifier ¶
func (s DynamicVolume) GetIdentifier() string
func (DynamicVolume) GetMountFromPath ¶
func (s DynamicVolume) GetMountFromPath() string
func (DynamicVolume) GetMountToPath ¶
func (s DynamicVolume) GetMountToPath() string
func (DynamicVolume) WithPathPrefix ¶
func (s DynamicVolume) WithPathPrefix(prefix string) DynamicVolume
type SimpleVolume ¶
func (SimpleVolume) GetIdentifier ¶
func (s SimpleVolume) GetIdentifier() string
func (SimpleVolume) GetMountToPath ¶
func (s SimpleVolume) GetMountToPath() string
type StaticFiles ¶
type StaticFiles struct { FromMountPathPrefix string ToMountPath string FileMap map[string]io.Reader }
func NewStaticFiles ¶
func NewStaticFiles(path string, fileMap map[string]io.Reader) StaticFiles
func (StaticFiles) GetIdentifier ¶
func (s StaticFiles) GetIdentifier() string
func (StaticFiles) GetMountFromPath ¶
func (s StaticFiles) GetMountFromPath() string
func (StaticFiles) GetMountToPath ¶
func (s StaticFiles) GetMountToPath() string
func (StaticFiles) WithPathPrefix ¶
func (s StaticFiles) WithPathPrefix(prefix string) StaticFiles
type SymLinkVolume ¶
func NewSymLinkVolume ¶
func NewSymLinkVolume(fromSymLinkPath string, localVolumePath string, mountToPath string) *SymLinkVolume
func (SymLinkVolume) GetIdentifier ¶
func (s SymLinkVolume) GetIdentifier() string
func (SymLinkVolume) GetMountToPath ¶
func (s SymLinkVolume) GetMountToPath() string
type WorkspaceManager ¶
type WorkspaceManager struct { ContainerManager ContainerManager Store WorkspaceManagerStore }
func NewWorkspaceManager ¶
func NewWorkspaceManager(cm ContainerManager, store WorkspaceManagerStore) *WorkspaceManager
func (WorkspaceManager) MakeContainerWorkspace ¶
func (w WorkspaceManager) MakeContainerWorkspace(workspaceID string) (*ContainerWorkspace, error)
func (WorkspaceManager) Reset ¶
func (w WorkspaceManager) Reset(ctx context.Context, workspaceID string) error
Click to show internal directories.
Click to hide internal directories.