schema

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2025 License: MIT Imports: 5 Imported by: 0

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 ApplyRequest struct {
	Meta   vmmSchema.Meta    `json:"meta"`
	From   string            `json:"from"`
	Params map[string]string `json:"params"`
}

type ContainerInfo

type ContainerInfo struct {
	ID       string
	Name     string
	Port     int
	Status   string
	CreateAt time.Time
}

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 OutboxResponse struct {
	Result string `json:"result"`
	Status string `json:"status"`
}

type SpawnRequest

type SpawnRequest struct {
	Pid    string           `json:"pid"`
	Owner  string           `json:"owner"`
	CuAddr string           `json:"cu_addr"`
	Data   []byte           `json:"data"`
	Tags   []goarSchema.Tag `json:"tags"`
	Evn    vmmSchema.Env    `json:"env"`
}

Jump to

Keyboard shortcuts

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