Documentation
¶
Overview ¶
Package sandbox defines the interface for managing sandbox instances
Index ¶
- type Disk
- type DiskFlags
- type Filesystem
- type NIC
- type Opt
- func WithDisk(blockID, mountPath string, flags DiskFlags) Opt
- func WithFS(tag, mountPath string, readonly bool) Opt
- func WithInitArgs(args ...string) Opt
- func WithNIC(endpoint string, mac net.HardwareAddr, mode int, features, flags uint32) Opt
- func WithResources(cpu uint8, memory uint32) Opt
- func WithStateDir(dir string) Opt
- type Options
- type Sandbox
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filesystem ¶
type Opt ¶
type Opt func(*Options)
func WithInitArgs ¶
func WithResources ¶
func WithStateDir ¶
type Sandbox ¶
type Sandbox interface {
Start(context.Context, ...Opt) error
Stop(context.Context) error
Client() (*ttrpc.Client, error)
StartStream(context.Context, string) (net.Conn, error)
}
Sandbox defines the interface for creating and managing the sandbox Only a single instance is allowed, calling Start with a sandbox already created or calling Client or Stop without a created sandbox will return a precondition error.
Click to show internal directories.
Click to hide internal directories.