runtime

package
v0.0.0-...-3322147 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Core_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "runtime.Core",
	HandlerType: (*CoreServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RunExecutable",
			Handler:    _Core_RunExecutable_Handler,
		},
		{
			MethodName: "RunPod",
			Handler:    _Core_RunPod_Handler,
		},
		{
			MethodName: "Spawn",
			Handler:    _Core_Spawn_Handler,
		},
		{
			MethodName: "RunVirtualMachine",
			Handler:    _Core_RunVirtualMachine_Handler,
		},
		{
			MethodName: "RunCell",
			Handler:    _Core_RunCell_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "runtime.proto",
}

Core_ServiceDesc is the grpc.ServiceDesc for Core service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_runtime_proto protoreflect.FileDescriptor

Functions

func RegisterCoreServer

func RegisterCoreServer(s grpc.ServiceRegistrar, srv CoreServer)

Types

type Cell

type Cell struct {
	Meta *meta.AuraeMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	// A set of containers.
	Containers []*Container `protobuf:"bytes,2,rep,name=containers,proto3" json:"containers,omitempty"`
	// contains filtered or unexported fields
}

A set of containers running on the same kernel as the auraed responding to the request.

func (*Cell) Descriptor deprecated

func (*Cell) Descriptor() ([]byte, []int)

Deprecated: Use Cell.ProtoReflect.Descriptor instead.

func (*Cell) GetContainers

func (x *Cell) GetContainers() []*Container

func (*Cell) GetMeta

func (x *Cell) GetMeta() *meta.AuraeMeta

func (*Cell) ProtoMessage

func (*Cell) ProtoMessage()

func (*Cell) ProtoReflect

func (x *Cell) ProtoReflect() protoreflect.Message

func (*Cell) Reset

func (x *Cell) Reset()

func (*Cell) String

func (x *Cell) String() string

type CellStatus

type CellStatus struct {
	Meta              *meta.AuraeMeta    `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	Status            meta.Status        `protobuf:"varint,2,opt,name=status,proto3,enum=meta.Status" json:"status,omitempty"`
	ContainerStatuses []*ContainerStatus `protobuf:"bytes,3,rep,name=container_statuses,json=containerStatuses,proto3" json:"container_statuses,omitempty"`
	// contains filtered or unexported fields
}

func (*CellStatus) Descriptor deprecated

func (*CellStatus) Descriptor() ([]byte, []int)

Deprecated: Use CellStatus.ProtoReflect.Descriptor instead.

func (*CellStatus) GetContainerStatuses

func (x *CellStatus) GetContainerStatuses() []*ContainerStatus

func (*CellStatus) GetMeta

func (x *CellStatus) GetMeta() *meta.AuraeMeta

func (*CellStatus) GetStatus

func (x *CellStatus) GetStatus() meta.Status

func (*CellStatus) ProtoMessage

func (*CellStatus) ProtoMessage()

func (*CellStatus) ProtoReflect

func (x *CellStatus) ProtoReflect() protoreflect.Message

func (*CellStatus) Reset

func (x *CellStatus) Reset()

func (*CellStatus) String

func (x *CellStatus) String() string

type Container

type Container struct {
	Meta *meta.AuraeMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	// OCI compliant image.
	Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"`
	// contains filtered or unexported fields
}

Container represents is an OCI compliant container image which can be executed.

func (*Container) Descriptor deprecated

func (*Container) Descriptor() ([]byte, []int)

Deprecated: Use Container.ProtoReflect.Descriptor instead.

func (*Container) GetImage

func (x *Container) GetImage() string

func (*Container) GetMeta

func (x *Container) GetMeta() *meta.AuraeMeta

func (*Container) ProtoMessage

func (*Container) ProtoMessage()

func (*Container) ProtoReflect

func (x *Container) ProtoReflect() protoreflect.Message

func (*Container) Reset

func (x *Container) Reset()

func (*Container) String

func (x *Container) String() string

type ContainerStatus

type ContainerStatus struct {
	Meta   *meta.AuraeMeta   `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	Proc   *meta.ProcessMeta `protobuf:"bytes,2,opt,name=proc,proto3" json:"proc,omitempty"`
	Status meta.Status       `protobuf:"varint,3,opt,name=status,proto3,enum=meta.Status" json:"status,omitempty"`
	// contains filtered or unexported fields
}

ContainerStatus is the status of a container after it has been executed.

func (*ContainerStatus) Descriptor deprecated

func (*ContainerStatus) Descriptor() ([]byte, []int)

Deprecated: Use ContainerStatus.ProtoReflect.Descriptor instead.

func (*ContainerStatus) GetMeta

func (x *ContainerStatus) GetMeta() *meta.AuraeMeta

func (*ContainerStatus) GetProc

func (x *ContainerStatus) GetProc() *meta.ProcessMeta

func (*ContainerStatus) GetStatus

func (x *ContainerStatus) GetStatus() meta.Status

func (*ContainerStatus) ProtoMessage

func (*ContainerStatus) ProtoMessage()

func (*ContainerStatus) ProtoReflect

func (x *ContainerStatus) ProtoReflect() protoreflect.Message

func (*ContainerStatus) Reset

func (x *ContainerStatus) Reset()

func (*ContainerStatus) String

func (x *ContainerStatus) String() string

type CoreClient

type CoreClient interface {
	// Run an Executable, the most fundamental runtime process. Akin to shell executing a command.
	//
	// * Executable should exist on system, does not pull from a remote.
	RunExecutable(ctx context.Context, in *Executable, opts ...grpc.CallOption) (*ExecutableStatus, error)
	// Spawn a new instance of Aurae, and then create a cell of containers inside the nested Aurae instance.
	//
	// * Accepts an OCI compliant container image, will always pull the image before running.
	// * Assumes Spawn() is successful and is able to bridge to the nested Aurae and the nested cell.
	RunPod(ctx context.Context, in *Pod, opts ...grpc.CallOption) (*PodStatus, error)
	// Spawn a short lived (ephemeral) nested virtual instance of Aurae which will terminate on exit.
	// Akin to fork() in Linux, each nested instance inherits properties from the parent but runs an
	// isolated virtual machine with its own kernel and auraed instance.
	//
	// * Inherits a bridged network device from the parent (TAP).
	// * Accepts an OCI compliant container image, will always pull the image before running.
	// * Manages mTLS certificates as necessary.
	Spawn(ctx context.Context, in *SpawnRequest, opts ...grpc.CallOption) (*SpawnResponse, error)
	// Run a long lived virtual instance which will persist on exit.
	// Akin to a QEMU virtual machine running with the base auraed as a hypervisor.
	//
	// * Pull from a remote registry (e.g. qcow format)
	// * Accepts a qcow compliant virtual machine image, will always pull the image before running.
	RunVirtualMachine(ctx context.Context, in *VirtualMachine, opts ...grpc.CallOption) (*VirtualMachineStatus, error)
	// Run a set of containers in a unique Cgroup with shared namespaces.
	// Akin to running a "container" in its most native way.
	//
	// * Accepts an OCI compliant container image, will always pull the image before running.
	// * Runs directly on the same kernel as the root Auraed.
	RunCell(ctx context.Context, in *Cell, opts ...grpc.CallOption) (*CellStatus, error)
}

CoreClient is the client API for Core service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewCoreClient

func NewCoreClient(cc grpc.ClientConnInterface) CoreClient

type CoreServer

type CoreServer interface {
	// Run an Executable, the most fundamental runtime process. Akin to shell executing a command.
	//
	// * Executable should exist on system, does not pull from a remote.
	RunExecutable(context.Context, *Executable) (*ExecutableStatus, error)
	// Spawn a new instance of Aurae, and then create a cell of containers inside the nested Aurae instance.
	//
	// * Accepts an OCI compliant container image, will always pull the image before running.
	// * Assumes Spawn() is successful and is able to bridge to the nested Aurae and the nested cell.
	RunPod(context.Context, *Pod) (*PodStatus, error)
	// Spawn a short lived (ephemeral) nested virtual instance of Aurae which will terminate on exit.
	// Akin to fork() in Linux, each nested instance inherits properties from the parent but runs an
	// isolated virtual machine with its own kernel and auraed instance.
	//
	// * Inherits a bridged network device from the parent (TAP).
	// * Accepts an OCI compliant container image, will always pull the image before running.
	// * Manages mTLS certificates as necessary.
	Spawn(context.Context, *SpawnRequest) (*SpawnResponse, error)
	// Run a long lived virtual instance which will persist on exit.
	// Akin to a QEMU virtual machine running with the base auraed as a hypervisor.
	//
	// * Pull from a remote registry (e.g. qcow format)
	// * Accepts a qcow compliant virtual machine image, will always pull the image before running.
	RunVirtualMachine(context.Context, *VirtualMachine) (*VirtualMachineStatus, error)
	// Run a set of containers in a unique Cgroup with shared namespaces.
	// Akin to running a "container" in its most native way.
	//
	// * Accepts an OCI compliant container image, will always pull the image before running.
	// * Runs directly on the same kernel as the root Auraed.
	RunCell(context.Context, *Cell) (*CellStatus, error)
	// contains filtered or unexported methods
}

CoreServer is the server API for Core service. All implementations must embed UnimplementedCoreServer for forward compatibility

type Executable

type Executable struct {
	Meta *meta.AuraeMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	/// Command resembles systemd's ExecStart. This is the shell command (with arguments) you intend to execute.
	Command string `protobuf:"bytes,3,opt,name=command,proto3" json:"command,omitempty"`
	/// Comment is an arbitrary (user defined) comment used to identify the Executable at runtime.
	Comment string `protobuf:"bytes,4,opt,name=comment,proto3" json:"comment,omitempty"`
	// contains filtered or unexported fields
}

Executable is the lowest level of compute that Aurae can execute. A basic process.

func (*Executable) Descriptor deprecated

func (*Executable) Descriptor() ([]byte, []int)

Deprecated: Use Executable.ProtoReflect.Descriptor instead.

func (*Executable) GetCommand

func (x *Executable) GetCommand() string

func (*Executable) GetComment

func (x *Executable) GetComment() string

func (*Executable) GetMeta

func (x *Executable) GetMeta() *meta.AuraeMeta

func (*Executable) ProtoMessage

func (*Executable) ProtoMessage()

func (*Executable) ProtoReflect

func (x *Executable) ProtoReflect() protoreflect.Message

func (*Executable) Reset

func (x *Executable) Reset()

func (*Executable) String

func (x *Executable) String() string

type ExecutableStatus

type ExecutableStatus struct {
	Meta   *meta.AuraeMeta   `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	Proc   *meta.ProcessMeta `protobuf:"bytes,2,opt,name=proc,proto3" json:"proc,omitempty"`
	Status meta.Status       `protobuf:"varint,3,opt,name=status,proto3,enum=meta.Status" json:"status,omitempty"`
	// The full stdout data.
	Stdout string `protobuf:"bytes,4,opt,name=stdout,proto3" json:"stdout,omitempty"`
	// The full stderr data.
	Stderr string `protobuf:"bytes,5,opt,name=stderr,proto3" json:"stderr,omitempty"`
	// The exit code (return code) of the process after termination.
	ExitCode string `protobuf:"bytes,6,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
	// contains filtered or unexported fields
}

ExecutableStatus is only returned after a process completes. Because runtime is a synchronous subsystem this will only return upon a terminated process.

func (*ExecutableStatus) Descriptor deprecated

func (*ExecutableStatus) Descriptor() ([]byte, []int)

Deprecated: Use ExecutableStatus.ProtoReflect.Descriptor instead.

func (*ExecutableStatus) GetExitCode

func (x *ExecutableStatus) GetExitCode() string

func (*ExecutableStatus) GetMeta

func (x *ExecutableStatus) GetMeta() *meta.AuraeMeta

func (*ExecutableStatus) GetProc

func (x *ExecutableStatus) GetProc() *meta.ProcessMeta

func (*ExecutableStatus) GetStatus

func (x *ExecutableStatus) GetStatus() meta.Status

func (*ExecutableStatus) GetStderr

func (x *ExecutableStatus) GetStderr() string

func (*ExecutableStatus) GetStdout

func (x *ExecutableStatus) GetStdout() string

func (*ExecutableStatus) ProtoMessage

func (*ExecutableStatus) ProtoMessage()

func (*ExecutableStatus) ProtoReflect

func (x *ExecutableStatus) ProtoReflect() protoreflect.Message

func (*ExecutableStatus) Reset

func (x *ExecutableStatus) Reset()

func (*ExecutableStatus) String

func (x *ExecutableStatus) String() string

type Instance

type Instance struct {
	Meta            *meta.AuraeMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	IsRoot          bool            `protobuf:"varint,2,opt,name=is_root,json=isRoot,proto3" json:"is_root,omitempty"`
	NestedInstances []*Instance     `protobuf:"bytes,3,rep,name=nested_instances,json=nestedInstances,proto3" json:"nested_instances,omitempty"`
	// contains filtered or unexported fields
}

Instance is a recursive graph structure which holds the meta data for the nested Aurae instances running on a machine.

func (*Instance) Descriptor deprecated

func (*Instance) Descriptor() ([]byte, []int)

Deprecated: Use Instance.ProtoReflect.Descriptor instead.

func (*Instance) GetIsRoot

func (x *Instance) GetIsRoot() bool

func (*Instance) GetMeta

func (x *Instance) GetMeta() *meta.AuraeMeta

func (*Instance) GetNestedInstances

func (x *Instance) GetNestedInstances() []*Instance

func (*Instance) ProtoMessage

func (*Instance) ProtoMessage()

func (*Instance) ProtoReflect

func (x *Instance) ProtoReflect() protoreflect.Message

func (*Instance) Reset

func (x *Instance) Reset()

func (*Instance) String

func (x *Instance) String() string

type Pod

type Pod struct {
	Meta *meta.AuraeMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	// The cell to create within the spawned Aurae instance.
	Cell *Cell `protobuf:"bytes,2,opt,name=cell,proto3" json:"cell,omitempty"`
	// contains filtered or unexported fields
}

Pod is a group of containers running in a spawned Aurae instance.

func (*Pod) Descriptor deprecated

func (*Pod) Descriptor() ([]byte, []int)

Deprecated: Use Pod.ProtoReflect.Descriptor instead.

func (*Pod) GetCell

func (x *Pod) GetCell() *Cell

func (*Pod) GetMeta

func (x *Pod) GetMeta() *meta.AuraeMeta

func (*Pod) ProtoMessage

func (*Pod) ProtoMessage()

func (*Pod) ProtoReflect

func (x *Pod) ProtoReflect() protoreflect.Message

func (*Pod) Reset

func (x *Pod) Reset()

func (*Pod) String

func (x *Pod) String() string

type PodStatus

type PodStatus struct {
	Meta   *meta.AuraeMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	Status meta.Status     `protobuf:"varint,3,opt,name=status,proto3,enum=meta.Status" json:"status,omitempty"`
	// The response of the necessary spawn for a pod.
	SpawnResponse *SpawnResponse `protobuf:"bytes,4,opt,name=spawn_response,json=spawnResponse,proto3" json:"spawn_response,omitempty"`
	// If the spawn is successful, the nested Aurae instance.
	Instance *Instance `protobuf:"bytes,5,opt,name=instance,proto3" json:"instance,omitempty"`
	// If the cell creation is successful, the cell of containers running in the spawned Aurae instance.
	CellStatus *CellStatus `protobuf:"bytes,6,opt,name=cell_status,json=cellStatus,proto3" json:"cell_status,omitempty"`
	// contains filtered or unexported fields
}

PodStatus is the status of a completed pod and its subsequent containers.

func (*PodStatus) Descriptor deprecated

func (*PodStatus) Descriptor() ([]byte, []int)

Deprecated: Use PodStatus.ProtoReflect.Descriptor instead.

func (*PodStatus) GetCellStatus

func (x *PodStatus) GetCellStatus() *CellStatus

func (*PodStatus) GetInstance

func (x *PodStatus) GetInstance() *Instance

func (*PodStatus) GetMeta

func (x *PodStatus) GetMeta() *meta.AuraeMeta

func (*PodStatus) GetSpawnResponse

func (x *PodStatus) GetSpawnResponse() *SpawnResponse

func (*PodStatus) GetStatus

func (x *PodStatus) GetStatus() meta.Status

func (*PodStatus) ProtoMessage

func (*PodStatus) ProtoMessage()

func (*PodStatus) ProtoReflect

func (x *PodStatus) ProtoReflect() protoreflect.Message

func (*PodStatus) Reset

func (x *PodStatus) Reset()

func (*PodStatus) String

func (x *PodStatus) String() string

type SpawnRequest

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

Parameters for spawning a new nested Aurae instance.

func (*SpawnRequest) Descriptor deprecated

func (*SpawnRequest) Descriptor() ([]byte, []int)

Deprecated: Use SpawnRequest.ProtoReflect.Descriptor instead.

func (*SpawnRequest) ProtoMessage

func (*SpawnRequest) ProtoMessage()

func (*SpawnRequest) ProtoReflect

func (x *SpawnRequest) ProtoReflect() protoreflect.Message

func (*SpawnRequest) Reset

func (x *SpawnRequest) Reset()

func (*SpawnRequest) String

func (x *SpawnRequest) String() string

type SpawnResponse

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

Response of a spawn.

func (*SpawnResponse) Descriptor deprecated

func (*SpawnResponse) Descriptor() ([]byte, []int)

Deprecated: Use SpawnResponse.ProtoReflect.Descriptor instead.

func (*SpawnResponse) ProtoMessage

func (*SpawnResponse) ProtoMessage()

func (*SpawnResponse) ProtoReflect

func (x *SpawnResponse) ProtoReflect() protoreflect.Message

func (*SpawnResponse) Reset

func (x *SpawnResponse) Reset()

func (*SpawnResponse) String

func (x *SpawnResponse) String() string

type UnimplementedCoreServer

type UnimplementedCoreServer struct {
}

UnimplementedCoreServer must be embedded to have forward compatible implementations.

func (UnimplementedCoreServer) RunCell

func (UnimplementedCoreServer) RunExecutable

func (UnimplementedCoreServer) RunPod

func (UnimplementedCoreServer) RunVirtualMachine

func (UnimplementedCoreServer) Spawn

type UnsafeCoreServer

type UnsafeCoreServer interface {
	// contains filtered or unexported methods
}

UnsafeCoreServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CoreServer will result in compilation errors.

type VirtualMachine

type VirtualMachine struct {
	Meta  *meta.AuraeMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	Name  string          `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Image string          `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"`
	// contains filtered or unexported fields
}

A long lived virtual machine which will persist on termination.

func (*VirtualMachine) Descriptor deprecated

func (*VirtualMachine) Descriptor() ([]byte, []int)

Deprecated: Use VirtualMachine.ProtoReflect.Descriptor instead.

func (*VirtualMachine) GetImage

func (x *VirtualMachine) GetImage() string

func (*VirtualMachine) GetMeta

func (x *VirtualMachine) GetMeta() *meta.AuraeMeta

func (*VirtualMachine) GetName

func (x *VirtualMachine) GetName() string

func (*VirtualMachine) ProtoMessage

func (*VirtualMachine) ProtoMessage()

func (*VirtualMachine) ProtoReflect

func (x *VirtualMachine) ProtoReflect() protoreflect.Message

func (*VirtualMachine) Reset

func (x *VirtualMachine) Reset()

func (*VirtualMachine) String

func (x *VirtualMachine) String() string

type VirtualMachineStatus

type VirtualMachineStatus struct {
	Meta   *meta.AuraeMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	Status meta.Status     `protobuf:"varint,2,opt,name=status,proto3,enum=meta.Status" json:"status,omitempty"`
	// contains filtered or unexported fields
}

Status of a terminated virtual machine.

func (*VirtualMachineStatus) Descriptor deprecated

func (*VirtualMachineStatus) Descriptor() ([]byte, []int)

Deprecated: Use VirtualMachineStatus.ProtoReflect.Descriptor instead.

func (*VirtualMachineStatus) GetMeta

func (x *VirtualMachineStatus) GetMeta() *meta.AuraeMeta

func (*VirtualMachineStatus) GetStatus

func (x *VirtualMachineStatus) GetStatus() meta.Status

func (*VirtualMachineStatus) ProtoMessage

func (*VirtualMachineStatus) ProtoMessage()

func (*VirtualMachineStatus) ProtoReflect

func (x *VirtualMachineStatus) ProtoReflect() protoreflect.Message

func (*VirtualMachineStatus) Reset

func (x *VirtualMachineStatus) Reset()

func (*VirtualMachineStatus) String

func (x *VirtualMachineStatus) String() string

Jump to

Keyboard shortcuts

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