Documentation
¶
Index ¶
Constants ¶
View Source
const (
ModuleFormat = "web.vmdocker-golua-ao.v0.0.1"
)
Variables ¶
View Source
var ( DockerVersion = "1.47" ExprotPort = "8080/tcp" AllowHost = "127.0.0.1" // Only host machine can access the container MaxMem = 12 * 1024 * 1024 * 1024 // max 12GB memory CheckpointDir = "checkpoints" // use mount to share models UseMount = false MountSource = os.ExpandEnv("$HOME/.ollama/models") MountTarget = "/app/models" )
Functions ¶
This section is empty.
Types ¶
type ApplyRequest ¶
type ContainerInfo ¶
type IDockerManager ¶
type IDockerManager interface {
// CreateContainer creates a new container with the given process id
CreateContainer(ctx context.Context, pid string, imageInfo ImageInfo) (*ContainerInfo, error)
// GetContainer returns container info by process id
GetContainer(pid string) (*ContainerInfo, error)
// RemoveContainer removes a container by process id
RemoveContainer(ctx context.Context, pid string) error
// StartContainer starts a container by process id
StartContainer(ctx context.Context, pid string) error
// StopContainer stops a container by process id
StopContainer(ctx context.Context, pid string) error
// Checkpoint creates a checkpoint for a container
Checkpoint(ctx context.Context, pid, checkpointName string) (string, error)
// Restore restores a container from checkpoint
Restore(ctx context.Context, pid, checkpointName, snapshot string) error
}
IDockerManager defines the interface for docker operations
type ImageInfo ¶
type ImageInfo struct {
Name string // Docker image name
SHA string // Image SHA256 digest for verification
}
ImageInfo contains image name and verification information
type OutboxResponse ¶
type SpawnRequest ¶
Click to show internal directories.
Click to hide internal directories.