docker

package module
v0.0.0-...-1be267e Latest Latest
Warning

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

Go to latest
Published: May 27, 2025 License: GPL-3.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrowserLabels

type BrowserLabels struct {
	ContainerLabels
	UrlRule string
	Enabled bool
}

type ContainerLabels

type ContainerLabels struct {
	VolumeId string        `json:"volume_id,omitempty"`
	Type     ContainerType `json:"type,omitempty"`
}

type ContainerType

type ContainerType string
const (
	Game        ContainerType = "GAME"
	FileBrowser               = "FILE_BROWSER"
)

type ImageLabels

type ImageLabels struct {
	Type ContainerType `json:"type,omitempty"`
}

type InstanceManager

type InstanceManager struct {
	instancemanager.InstanceManager
	// contains filtered or unexported fields
}

func NewInstanceManager

func NewInstanceManager(config models.DockerInstanceManagerConfig, siteDomain string) (*InstanceManager, error)

func (*InstanceManager) CreateServer

func (im *InstanceManager) CreateServer(ctx context.Context) (*instancemanager.Server, error)

func (*InstanceManager) DeleteServer

func (im *InstanceManager) DeleteServer(ctx context.Context, serverId string) error

func (*InstanceManager) GetFileBrowser

func (im *InstanceManager) GetFileBrowser(ctx context.Context, serverId string) (*models.FileBrowser, error)

Read Only

func (*InstanceManager) GetImage

func (im *InstanceManager) GetImage(ctx context.Context, imageId string) (*instancemanager.Image, error)

General Read Only

func (*InstanceManager) GetServer

func (im *InstanceManager) GetServer(ctx context.Context, serverId string) (*instancemanager.Server, error)

func (*InstanceManager) GetServerIdFromFileBrowserUrl

func (im *InstanceManager) GetServerIdFromFileBrowserUrl(ctx context.Context, url string) (string, error)

func (*InstanceManager) InteractiveTerminal

func (im *InstanceManager) InteractiveTerminal(ctx context.Context, serverId string) (*instancemanager.TerminalConnection, error)

Terminal Status Changing

func (*InstanceManager) ListFileBrowsers

func (im *InstanceManager) ListFileBrowsers(ctx context.Context) ([]models.FileBrowser, error)

func (*InstanceManager) ListImages

func (im *InstanceManager) ListImages(ctx context.Context) ([]instancemanager.Image, error)

func (*InstanceManager) ListServers

func (im *InstanceManager) ListServers(ctx context.Context) ([]instancemanager.Server, error)

func (*InstanceManager) ResizeTerminal

func (im *InstanceManager) ResizeTerminal(ctx context.Context, serverId string, width uint, height uint) error

func (*InstanceManager) StartFileBrowser

func (im *InstanceManager) StartFileBrowser(ctx context.Context, serverId string) (*models.FileBrowser, error)

Status Changing

func (*InstanceManager) StartServer

func (im *InstanceManager) StartServer(ctx context.Context,
	serverId string,
	imageId string,
	command string,
	ports []models.Port,
) error

State Changing

func (*InstanceManager) StopFileBrowser

func (im *InstanceManager) StopFileBrowser(ctx context.Context, serverId string) error

func (*InstanceManager) StopServer

func (im *InstanceManager) StopServer(ctx context.Context, serverId string) error

type VolumeLabels

type VolumeLabels struct {
	Type     ContainerType `json:"type,omitempty"`
	VolumeId string        `json:"volume_id,omitempty"`
}

Jump to

Keyboard shortcuts

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