runtime

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runtime

type Runtime struct {
	// contains filtered or unexported fields
}

func New

func New(config *config.RuntimeConfig, registries registry.RegistriesConfig, store Store) (*Runtime, error)

func (*Runtime) CreateDisk added in v0.7.0

func (r *Runtime) CreateDisk(id string, sizeMB uint64) (*disks.Disk, error)

func (*Runtime) CreateInstance

func (r *Runtime) CreateInstance(ctx context.Context, opt instance.InstanceOptions) (*instance.Instance, error)

func (*Runtime) DeleteImage

func (r *Runtime) DeleteImage(ctx context.Context, ref string) error

func (*Runtime) DestroyDisk added in v0.7.0

func (r *Runtime) DestroyDisk(id string) error

func (*Runtime) DestroyInstance

func (r *Runtime) DestroyInstance(ctx context.Context, id string) error

func (*Runtime) GetDisk added in v0.7.0

func (r *Runtime) GetDisk(id string) (*disks.Disk, error)

func (*Runtime) GetInstance

func (r *Runtime) GetInstance(id string) (*instance.Instance, error)

func (*Runtime) GetInstanceLogs

func (r *Runtime) GetInstanceLogs(id string) ([]*api.LogEntry, error)

func (*Runtime) InstanceExec

func (r *Runtime) InstanceExec(ctx context.Context, id string, cmd []string, timeout time.Duration) (*api.ExecResult, error)

func (*Runtime) ListDisks added in v0.7.0

func (r *Runtime) ListDisks() ([]disks.Disk, error)

func (*Runtime) ListImages

func (r *Runtime) ListImages(ctx context.Context) ([]daemon.Image, error)

func (*Runtime) ListInstances

func (r *Runtime) ListInstances() []instance.Instance

func (*Runtime) PruneImages

func (r *Runtime) PruneImages(ctx context.Context) error

func (*Runtime) PullImage

func (r *Runtime) PullImage(ctx context.Context, opt daemon.ImagePullOptions) (*daemon.Image, error)

func (*Runtime) Start

func (r *Runtime) Start() error

func (*Runtime) StartInstance

func (r *Runtime) StartInstance(ctx context.Context, id string) error

func (*Runtime) StopInstance

func (r *Runtime) StopInstance(ctx context.Context, id string, opt *api.StopConfig) error

func (*Runtime) SubscribeToInstanceLogs

func (r *Runtime) SubscribeToInstanceLogs(ctx context.Context, id string) ([]*api.LogEntry, <-chan *api.LogEntry, error)

func (*Runtime) WatchInstanceState

func (r *Runtime) WatchInstanceState(ctx context.Context, id string) (<-chan instance.State, error)

type State

type State struct {
	// contains filtered or unexported fields
}

func NewState

func NewState() *State

func (*State) AddInstance

func (s *State) AddInstance(id string, manager *instancerunner.InstanceRunner)

func (*State) Delete

func (s *State) Delete(id string)

func (*State) GetInstance

func (s *State) GetInstance(id string) (*instancerunner.InstanceRunner, error)

func (*State) List

func (s *State) List() []instance.Instance

func (*State) ReleaseId

func (s *State) ReleaseId(id string)

func (*State) ReserveId

func (s *State) ReserveId(id string) bool

type Store added in v0.7.0

type Store interface {
	instance.InstanceStore
	disks.Store
}

Directories

Path Synopsis
vm

Jump to

Keyboard shortcuts

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