Documentation ¶
Index ¶
- Constants
- Variables
- func ArchivePackage(stateInputPath string, memoryInputPath string, initramfsInputPath string, ...) error
- func ExtractPackage(packageInputPath string, stateOutputPath string, memoryOutputPath string, ...) error
- type Deltas
- type Peer
- func (p *Peer) Close(suspend bool) error
- func (p *Peer) Connect(ctx context.Context) (*Sizes, error)
- func (p *Peer) Leech(ctx context.Context) (*Deltas, error)
- func (p *Peer) Resume(ctx context.Context) (string, error)
- func (p *Peer) Seed(ctx context.Context) (*config.ResourceAddresses, error)
- func (p *Peer) Serve() error
- func (p *Peer) Wait() error
- type PeerHooks
- type Runner
- type Sizes
- type Snapshotter
Constants ¶
View Source
const (
VSockName = "drafter.drftsock"
)
Variables ¶
View Source
var ( ErrMissingInitramfs = errors.New("missing initramfs") ErrMissingKernel = errors.New("missing kernel") ErrMissingDisk = errors.New("missing disk") ErrMissingState = errors.New("missing state") ErrMissingMemory = errors.New("missing memory") ErrMissingConfig = errors.New("missing config") )
View Source
var ( ErrCouldNotGetDeviceStat = errors.New("could not get device stat") ErrNoRaddrOrPathGivenForResource = errors.New("no raddr or path given for resource") )
View Source
var (
ErrVMNotRunning = errors.New("vm not running")
)
Functions ¶
func ArchivePackage ¶
Types ¶
type Peer ¶
type Peer struct {
// contains filtered or unexported fields
}
func NewPeer ¶
func NewPeer( verbose bool, claimNamespace func() (string, error), releaseNamespace func(namespace string) error, hypervisorConfiguration config.HypervisorConfiguration, migratorOptions *migration.MigratorOptions, hooks PeerHooks, cacheBaseDir string, raddrs config.ResourceAddresses, paths config.ResourceAddresses, laddrs config.ResourceAddresses, resumeThresholds config.ResourceResumeThresholds, resumeTimeout time.Duration, ) *Peer
type PeerHooks ¶
type PeerHooks struct { OnBeforeSuspend func() error OnAfterSuspend func() error OnBeforeStop func() error OnAfterStop func() error OnStateLeechProgress func(remainingDataSize int64) error OnMemoryLeechProgress func(remainingDataSize int64) error OnInitramfsLeechProgress func(remainingDataSize int64) error OnKernelLeechProgress func(remainingDataSize int64) error OnDiskLeechProgress func(remainingDataSize int64) error OnConfigLeechProgress func(remainingDataSize int64) error }
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func NewRunner ¶
func NewRunner( hypervisorConfiguration config.HypervisorConfiguration, stateName string, memoryName string, ) *Runner
type Snapshotter ¶
type Snapshotter struct {
// contains filtered or unexported fields
}
func NewSnapshotter ¶
func NewSnapshotter() *Snapshotter
func (*Snapshotter) CreateSnapshot ¶
func (p *Snapshotter) CreateSnapshot( ctx context.Context, initramfsInputPath string, kernelInputPath string, diskInputPath string, stateOutputPath string, memoryOutputPath string, initramfsOutputPath string, kernelOutputPath string, diskOutputPath string, configOutputPath string, vmConfiguration config.VMConfiguration, livenessConfiguration config.LivenessConfiguration, hypervisorConfiguration config.HypervisorConfiguration, networkConfiguration config.NetworkConfiguration, agentConfiguration config.AgentConfiguration, knownNamesConfiguration config.KnownNamesConfiguration, ) error
func (*Snapshotter) Wait ¶
func (r *Snapshotter) Wait() error
Click to show internal directories.
Click to hide internal directories.