external

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Driver_Validate_FullMethodName              = "/Driver/Validate"
	Driver_Create_FullMethodName                = "/Driver/Create"
	Driver_CreateDisk_FullMethodName            = "/Driver/CreateDisk"
	Driver_Start_FullMethodName                 = "/Driver/Start"
	Driver_Stop_FullMethodName                  = "/Driver/Stop"
	Driver_Delete_FullMethodName                = "/Driver/Delete"
	Driver_BootScripts_FullMethodName           = "/Driver/BootScripts"
	Driver_RunGUI_FullMethodName                = "/Driver/RunGUI"
	Driver_ChangeDisplayPassword_FullMethodName = "/Driver/ChangeDisplayPassword"
	Driver_GetDisplayConnection_FullMethodName  = "/Driver/GetDisplayConnection"
	Driver_CreateSnapshot_FullMethodName        = "/Driver/CreateSnapshot"
	Driver_ApplySnapshot_FullMethodName         = "/Driver/ApplySnapshot"
	Driver_DeleteSnapshot_FullMethodName        = "/Driver/DeleteSnapshot"
	Driver_ListSnapshots_FullMethodName         = "/Driver/ListSnapshots"
	Driver_ForwardGuestAgent_FullMethodName     = "/Driver/ForwardGuestAgent"
	Driver_GuestAgentConn_FullMethodName        = "/Driver/GuestAgentConn"
	Driver_Configure_FullMethodName             = "/Driver/Configure"
	Driver_Info_FullMethodName                  = "/Driver/Info"
	Driver_SSHAddress_FullMethodName            = "/Driver/SSHAddress"
	Driver_AdditionalSetupForSSH_FullMethodName = "/Driver/AdditionalSetupForSSH"
)

Variables

View Source
var Driver_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Driver",
	HandlerType: (*DriverServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Validate",
			Handler:    _Driver_Validate_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _Driver_Create_Handler,
		},
		{
			MethodName: "CreateDisk",
			Handler:    _Driver_CreateDisk_Handler,
		},
		{
			MethodName: "Stop",
			Handler:    _Driver_Stop_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Driver_Delete_Handler,
		},
		{
			MethodName: "BootScripts",
			Handler:    _Driver_BootScripts_Handler,
		},
		{
			MethodName: "RunGUI",
			Handler:    _Driver_RunGUI_Handler,
		},
		{
			MethodName: "ChangeDisplayPassword",
			Handler:    _Driver_ChangeDisplayPassword_Handler,
		},
		{
			MethodName: "GetDisplayConnection",
			Handler:    _Driver_GetDisplayConnection_Handler,
		},
		{
			MethodName: "CreateSnapshot",
			Handler:    _Driver_CreateSnapshot_Handler,
		},
		{
			MethodName: "ApplySnapshot",
			Handler:    _Driver_ApplySnapshot_Handler,
		},
		{
			MethodName: "DeleteSnapshot",
			Handler:    _Driver_DeleteSnapshot_Handler,
		},
		{
			MethodName: "ListSnapshots",
			Handler:    _Driver_ListSnapshots_Handler,
		},
		{
			MethodName: "ForwardGuestAgent",
			Handler:    _Driver_ForwardGuestAgent_Handler,
		},
		{
			MethodName: "GuestAgentConn",
			Handler:    _Driver_GuestAgentConn_Handler,
		},
		{
			MethodName: "Configure",
			Handler:    _Driver_Configure_Handler,
		},
		{
			MethodName: "Info",
			Handler:    _Driver_Info_Handler,
		},
		{
			MethodName: "SSHAddress",
			Handler:    _Driver_SSHAddress_Handler,
		},
		{
			MethodName: "AdditionalSetupForSSH",
			Handler:    _Driver_AdditionalSetupForSSH_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Start",
			Handler:       _Driver_Start_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "driver.proto",
}

Driver_ServiceDesc is the grpc.ServiceDesc for Driver 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_driver_proto protoreflect.FileDescriptor

Functions

func RegisterDriverServer

func RegisterDriverServer(s grpc.ServiceRegistrar, srv DriverServer)

Types

type ApplySnapshotRequest

type ApplySnapshotRequest struct {

	// Names the snapshot to restore.
	Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
	// contains filtered or unexported fields
}

ApplySnapshotRequest identifies the snapshot to restore.

func (*ApplySnapshotRequest) Descriptor deprecated

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

Deprecated: Use ApplySnapshotRequest.ProtoReflect.Descriptor instead.

func (*ApplySnapshotRequest) GetTag

func (x *ApplySnapshotRequest) GetTag() string

func (*ApplySnapshotRequest) ProtoMessage

func (*ApplySnapshotRequest) ProtoMessage()

func (*ApplySnapshotRequest) ProtoReflect

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

func (*ApplySnapshotRequest) Reset

func (x *ApplySnapshotRequest) Reset()

func (*ApplySnapshotRequest) String

func (x *ApplySnapshotRequest) String() string

type BootScriptsResponse

type BootScriptsResponse struct {

	// Maps a script path to its content. Each key must be
	// "boot.<OS>/<SCRIPT>", or "<SCRIPT>" as a deprecated alias for
	// "boot.Linux/<SCRIPT>".
	Scripts map[string][]byte `` /* 141-byte string literal not displayed */
	// contains filtered or unexported fields
}

BootScriptsResponse carries the boot scripts injected into the VM.

func (*BootScriptsResponse) Descriptor deprecated

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

Deprecated: Use BootScriptsResponse.ProtoReflect.Descriptor instead.

func (*BootScriptsResponse) GetScripts

func (x *BootScriptsResponse) GetScripts() map[string][]byte

func (*BootScriptsResponse) ProtoMessage

func (*BootScriptsResponse) ProtoMessage()

func (*BootScriptsResponse) ProtoReflect

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

func (*BootScriptsResponse) Reset

func (x *BootScriptsResponse) Reset()

func (*BootScriptsResponse) String

func (x *BootScriptsResponse) String() string

type ChangeDisplayPasswordRequest

type ChangeDisplayPasswordRequest struct {

	// New VM display (e.g. VNC) password.
	Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

ChangeDisplayPasswordRequest carries the new display password.

func (*ChangeDisplayPasswordRequest) Descriptor deprecated

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

Deprecated: Use ChangeDisplayPasswordRequest.ProtoReflect.Descriptor instead.

func (*ChangeDisplayPasswordRequest) GetPassword

func (x *ChangeDisplayPasswordRequest) GetPassword() string

func (*ChangeDisplayPasswordRequest) ProtoMessage

func (*ChangeDisplayPasswordRequest) ProtoMessage()

func (*ChangeDisplayPasswordRequest) ProtoReflect

func (*ChangeDisplayPasswordRequest) Reset

func (x *ChangeDisplayPasswordRequest) Reset()

func (*ChangeDisplayPasswordRequest) String

type CreateSnapshotRequest

type CreateSnapshotRequest struct {

	// Names the snapshot.
	Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
	// contains filtered or unexported fields
}

CreateSnapshotRequest identifies the snapshot to create.

func (*CreateSnapshotRequest) Descriptor deprecated

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

Deprecated: Use CreateSnapshotRequest.ProtoReflect.Descriptor instead.

func (*CreateSnapshotRequest) GetTag

func (x *CreateSnapshotRequest) GetTag() string

func (*CreateSnapshotRequest) ProtoMessage

func (*CreateSnapshotRequest) ProtoMessage()

func (*CreateSnapshotRequest) ProtoReflect

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

func (*CreateSnapshotRequest) Reset

func (x *CreateSnapshotRequest) Reset()

func (*CreateSnapshotRequest) String

func (x *CreateSnapshotRequest) String() string

type DeleteSnapshotRequest

type DeleteSnapshotRequest struct {

	// Names the snapshot to delete.
	Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
	// contains filtered or unexported fields
}

DeleteSnapshotRequest identifies the snapshot to delete.

func (*DeleteSnapshotRequest) Descriptor deprecated

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

Deprecated: Use DeleteSnapshotRequest.ProtoReflect.Descriptor instead.

func (*DeleteSnapshotRequest) GetTag

func (x *DeleteSnapshotRequest) GetTag() string

func (*DeleteSnapshotRequest) ProtoMessage

func (*DeleteSnapshotRequest) ProtoMessage()

func (*DeleteSnapshotRequest) ProtoReflect

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

func (*DeleteSnapshotRequest) Reset

func (x *DeleteSnapshotRequest) Reset()

func (*DeleteSnapshotRequest) String

func (x *DeleteSnapshotRequest) String() string

type DriverClient

type DriverClient interface {
	// Validate reports whether the driver supports the currently configured
	// instance. It is called early on the start path, before Create. Returning
	// an error aborts the operation.
	Validate(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Create performs first-time provisioning of the instance (e.g. writing a
	// "vz-identifier" file). It MUST return successfully (no-op) when called
	// against an instance that already exists, and it MUST NOT create the disks
	// (that is CreateDisk's job).
	Create(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// CreateDisk creates the instance disk(s). It is called after Create.
	CreateDisk(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Start begins booting the VM. It is a server-streaming RPC that mirrors the
	// `(chan error, error)` return of the in-process interface: the call returns
	// once boot has been initiated (the initial StartResponse), not once the
	// guest has finished booting, and later boot errors arrive on the stream. See
	// StartResponse for the streaming protocol.
	Start(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StartResponse], error)
	// Stop terminates the running VM. It blocks until the VM has fully exited
	// (or the driver's internal shutdown deadline elapses) and returns a gRPC
	// error status if the shutdown failed.
	Stop(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Delete removes the instance created by Create (and its driver-specific
	// files). The generic instance directory is removed by the host agent.
	Delete(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// BootScripts returns the boot scripts to inject into the VM via cloud-init.
	// See BootScriptsResponse for the required key format.
	BootScripts(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*BootScriptsResponse, error)
	// RunGUI starts the GUI synchronously. It blocks and returns only after the
	// VM terminates. It is only used by drivers that report Features.canRunGui.
	RunGUI(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// ChangeDisplayPassword sets the password for the VM display (e.g. VNC).
	ChangeDisplayPassword(ctx context.Context, in *ChangeDisplayPasswordRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// GetDisplayConnection returns the connection string for the VM display.
	GetDisplayConnection(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetDisplayConnectionResponse, error)
	// CreateSnapshot creates a VM snapshot identified by the given tag.
	CreateSnapshot(ctx context.Context, in *CreateSnapshotRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// ApplySnapshot restores the VM to the snapshot identified by the given tag.
	ApplySnapshot(ctx context.Context, in *ApplySnapshotRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// DeleteSnapshot removes the snapshot identified by the given tag.
	DeleteSnapshot(ctx context.Context, in *DeleteSnapshotRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// ListSnapshots returns the driver-formatted list of existing snapshots.
	ListSnapshots(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListSnapshotsResponse, error)
	// ForwardGuestAgent reports whether the host agent must forward the guest
	// agent socket over SSH. When false, the driver provides a direct guest agent
	// connection via GuestAgentConn (e.g. vsock/virtio).
	ForwardGuestAgent(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ForwardGuestAgentResponse, error)
	// GuestAgentConn returns a direct guest agent connection, used when
	// ForwardGuestAgent is false; it returns nil when the socket is forwarded
	// over SSH instead. Over this transport the server bridges the connection to
	// a unix socket in the instance directory when it is not already one, so the
	// client relies on that socket rather than on a returned connection.
	GuestAgentConn(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Configure sets the instance configuration on the driver. It must be called
	// before RPCs that depend on the config.
	Configure(ctx context.Context, in *SetConfigRequest, opts ...grpc.CallOption) (*SetConfigResponse, error)
	// Info returns driver metadata and capability flags (see InfoResponse). The
	// host agent uses it to discover features such as dynamicSSHAddress.
	Info(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*InfoResponse, error)
	// SSHAddress returns the address used to SSH into the guest. For drivers that
	// report Features.dynamicSSHAddress the address is not known until after
	// Start, so the host agent re-queries it at that point.
	SSHAddress(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SSHAddressResponse, error)
	// AdditionalSetupForSSH provides additional setup required for SSH connection.
	// It is called right after Start returns (boot initiated, the guest is not
	// necessarily up yet), before the first SSH connection.
	AdditionalSetupForSSH(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

DriverClient is the client API for Driver 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.

Driver is the transport used by an external VM driver. It is the gRPC projection of the Go `driver.Driver` interface (pkg/driver/driver.go): the host agent runs a gRPC client and each external driver binary (lima-driver-<name>) runs the server. The RPCs mirror the interface methods one-to-one, so this file is the authoritative contract for driver authors.

Call ordering on the instance start path: instance.Prepare (pkg/instance) runs steps 1-4, then the host agent (pkg/hostagent) boots the VM and runs steps 5-7. Creating an instance without starting it (limactl create) only runs Configure and Create.

  1. Configure - set the instance config; must run before any method that depends on it.
  2. Validate - reject configs the driver cannot support.
  3. Create - first-time provisioning; a no-op on existing instances.
  4. CreateDisk - create the instance disk(s).
  5. Start - begin booting the VM. It returns once boot has been initiated (the initial StartResponse), not once the guest has finished booting; later boot errors arrive on the stream. See StartResponse.
  6. AdditionalSetupForSSH - runs right after Start returns (boot initiated, the guest is not necessarily up yet), before the first SSH connection.
  7. SSHAddress - re-queried after Start only when Info reports Features.dynamicSSHAddress.

Unless stated otherwise, an RPC returning google.protobuf.Empty completes synchronously and reports failures as a gRPC error status. Requests and responses that carry structured data use JSON payloads (Info, Configure) to stay in sync with the Go types without duplicating them here.

Concurrency: the start-path RPCs above are invoked sequentially in the order listed. Once the VM is running, the host agent polls read-only RPCs (notably Info and ForwardGuestAgent) from background goroutines, so the driver server must be safe to handle concurrent RPCs.

func NewDriverClient

func NewDriverClient(cc grpc.ClientConnInterface) DriverClient

type DriverServer

type DriverServer interface {
	// Validate reports whether the driver supports the currently configured
	// instance. It is called early on the start path, before Create. Returning
	// an error aborts the operation.
	Validate(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// Create performs first-time provisioning of the instance (e.g. writing a
	// "vz-identifier" file). It MUST return successfully (no-op) when called
	// against an instance that already exists, and it MUST NOT create the disks
	// (that is CreateDisk's job).
	Create(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// CreateDisk creates the instance disk(s). It is called after Create.
	CreateDisk(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// Start begins booting the VM. It is a server-streaming RPC that mirrors the
	// `(chan error, error)` return of the in-process interface: the call returns
	// once boot has been initiated (the initial StartResponse), not once the
	// guest has finished booting, and later boot errors arrive on the stream. See
	// StartResponse for the streaming protocol.
	Start(*emptypb.Empty, grpc.ServerStreamingServer[StartResponse]) error
	// Stop terminates the running VM. It blocks until the VM has fully exited
	// (or the driver's internal shutdown deadline elapses) and returns a gRPC
	// error status if the shutdown failed.
	Stop(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// Delete removes the instance created by Create (and its driver-specific
	// files). The generic instance directory is removed by the host agent.
	Delete(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// BootScripts returns the boot scripts to inject into the VM via cloud-init.
	// See BootScriptsResponse for the required key format.
	BootScripts(context.Context, *emptypb.Empty) (*BootScriptsResponse, error)
	// RunGUI starts the GUI synchronously. It blocks and returns only after the
	// VM terminates. It is only used by drivers that report Features.canRunGui.
	RunGUI(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// ChangeDisplayPassword sets the password for the VM display (e.g. VNC).
	ChangeDisplayPassword(context.Context, *ChangeDisplayPasswordRequest) (*emptypb.Empty, error)
	// GetDisplayConnection returns the connection string for the VM display.
	GetDisplayConnection(context.Context, *emptypb.Empty) (*GetDisplayConnectionResponse, error)
	// CreateSnapshot creates a VM snapshot identified by the given tag.
	CreateSnapshot(context.Context, *CreateSnapshotRequest) (*emptypb.Empty, error)
	// ApplySnapshot restores the VM to the snapshot identified by the given tag.
	ApplySnapshot(context.Context, *ApplySnapshotRequest) (*emptypb.Empty, error)
	// DeleteSnapshot removes the snapshot identified by the given tag.
	DeleteSnapshot(context.Context, *DeleteSnapshotRequest) (*emptypb.Empty, error)
	// ListSnapshots returns the driver-formatted list of existing snapshots.
	ListSnapshots(context.Context, *emptypb.Empty) (*ListSnapshotsResponse, error)
	// ForwardGuestAgent reports whether the host agent must forward the guest
	// agent socket over SSH. When false, the driver provides a direct guest agent
	// connection via GuestAgentConn (e.g. vsock/virtio).
	ForwardGuestAgent(context.Context, *emptypb.Empty) (*ForwardGuestAgentResponse, error)
	// GuestAgentConn returns a direct guest agent connection, used when
	// ForwardGuestAgent is false; it returns nil when the socket is forwarded
	// over SSH instead. Over this transport the server bridges the connection to
	// a unix socket in the instance directory when it is not already one, so the
	// client relies on that socket rather than on a returned connection.
	GuestAgentConn(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// Configure sets the instance configuration on the driver. It must be called
	// before RPCs that depend on the config.
	Configure(context.Context, *SetConfigRequest) (*SetConfigResponse, error)
	// Info returns driver metadata and capability flags (see InfoResponse). The
	// host agent uses it to discover features such as dynamicSSHAddress.
	Info(context.Context, *emptypb.Empty) (*InfoResponse, error)
	// SSHAddress returns the address used to SSH into the guest. For drivers that
	// report Features.dynamicSSHAddress the address is not known until after
	// Start, so the host agent re-queries it at that point.
	SSHAddress(context.Context, *emptypb.Empty) (*SSHAddressResponse, error)
	// AdditionalSetupForSSH provides additional setup required for SSH connection.
	// It is called right after Start returns (boot initiated, the guest is not
	// necessarily up yet), before the first SSH connection.
	AdditionalSetupForSSH(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

DriverServer is the server API for Driver service. All implementations must embed UnimplementedDriverServer for forward compatibility.

Driver is the transport used by an external VM driver. It is the gRPC projection of the Go `driver.Driver` interface (pkg/driver/driver.go): the host agent runs a gRPC client and each external driver binary (lima-driver-<name>) runs the server. The RPCs mirror the interface methods one-to-one, so this file is the authoritative contract for driver authors.

Call ordering on the instance start path: instance.Prepare (pkg/instance) runs steps 1-4, then the host agent (pkg/hostagent) boots the VM and runs steps 5-7. Creating an instance without starting it (limactl create) only runs Configure and Create.

  1. Configure - set the instance config; must run before any method that depends on it.
  2. Validate - reject configs the driver cannot support.
  3. Create - first-time provisioning; a no-op on existing instances.
  4. CreateDisk - create the instance disk(s).
  5. Start - begin booting the VM. It returns once boot has been initiated (the initial StartResponse), not once the guest has finished booting; later boot errors arrive on the stream. See StartResponse.
  6. AdditionalSetupForSSH - runs right after Start returns (boot initiated, the guest is not necessarily up yet), before the first SSH connection.
  7. SSHAddress - re-queried after Start only when Info reports Features.dynamicSSHAddress.

Unless stated otherwise, an RPC returning google.protobuf.Empty completes synchronously and reports failures as a gRPC error status. Requests and responses that carry structured data use JSON payloads (Info, Configure) to stay in sync with the Go types without duplicating them here.

Concurrency: the start-path RPCs above are invoked sequentially in the order listed. Once the VM is running, the host agent polls read-only RPCs (notably Info and ForwardGuestAgent) from background goroutines, so the driver server must be safe to handle concurrent RPCs.

type Driver_StartClient

type Driver_StartClient = grpc.ServerStreamingClient[StartResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Driver_StartServer

type Driver_StartServer = grpc.ServerStreamingServer[StartResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type ForwardGuestAgentResponse

type ForwardGuestAgentResponse struct {

	// True when the host agent forwards the guest agent socket over SSH; false
	// means the driver provides a direct connection via GuestAgentConn.
	ShouldForward bool `protobuf:"varint,1,opt,name=should_forward,json=shouldForward,proto3" json:"should_forward,omitempty"`
	// contains filtered or unexported fields
}

ForwardGuestAgentResponse reports how the guest agent is reached.

func (*ForwardGuestAgentResponse) Descriptor deprecated

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

Deprecated: Use ForwardGuestAgentResponse.ProtoReflect.Descriptor instead.

func (*ForwardGuestAgentResponse) GetShouldForward

func (x *ForwardGuestAgentResponse) GetShouldForward() bool

func (*ForwardGuestAgentResponse) ProtoMessage

func (*ForwardGuestAgentResponse) ProtoMessage()

func (*ForwardGuestAgentResponse) ProtoReflect

func (*ForwardGuestAgentResponse) Reset

func (x *ForwardGuestAgentResponse) Reset()

func (*ForwardGuestAgentResponse) String

func (x *ForwardGuestAgentResponse) String() string

type GetDisplayConnectionResponse

type GetDisplayConnectionResponse struct {

	// Driver-specific display connection string.
	Connection string `protobuf:"bytes,1,opt,name=connection,proto3" json:"connection,omitempty"`
	// contains filtered or unexported fields
}

GetDisplayConnectionResponse carries the VM display connection string.

func (*GetDisplayConnectionResponse) Descriptor deprecated

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

Deprecated: Use GetDisplayConnectionResponse.ProtoReflect.Descriptor instead.

func (*GetDisplayConnectionResponse) GetConnection

func (x *GetDisplayConnectionResponse) GetConnection() string

func (*GetDisplayConnectionResponse) ProtoMessage

func (*GetDisplayConnectionResponse) ProtoMessage()

func (*GetDisplayConnectionResponse) ProtoReflect

func (*GetDisplayConnectionResponse) Reset

func (x *GetDisplayConnectionResponse) Reset()

func (*GetDisplayConnectionResponse) String

type InfoResponse

type InfoResponse struct {

	// JSON-encoded driver.Info (name, ports, instance dir and feature flags).
	// JSON keeps it in sync with the Go type. The full set of fields is defined at
	// https://pkg.go.dev/github.com/lima-vm/lima/v2/pkg/driver#Info
	InfoJson []byte `protobuf:"bytes,1,opt,name=info_json,json=infoJson,proto3" json:"info_json,omitempty"`
	// contains filtered or unexported fields
}

InfoResponse carries driver metadata and capability flags.

func (*InfoResponse) Descriptor deprecated

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

Deprecated: Use InfoResponse.ProtoReflect.Descriptor instead.

func (*InfoResponse) GetInfoJson

func (x *InfoResponse) GetInfoJson() []byte

func (*InfoResponse) ProtoMessage

func (*InfoResponse) ProtoMessage()

func (*InfoResponse) ProtoReflect

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

func (*InfoResponse) Reset

func (x *InfoResponse) Reset()

func (*InfoResponse) String

func (x *InfoResponse) String() string

type ListSnapshotsResponse

type ListSnapshotsResponse struct {

	// Driver-formatted list of existing snapshots.
	Snapshots string `protobuf:"bytes,1,opt,name=snapshots,proto3" json:"snapshots,omitempty"`
	// contains filtered or unexported fields
}

ListSnapshotsResponse carries the existing snapshots.

func (*ListSnapshotsResponse) Descriptor deprecated

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

Deprecated: Use ListSnapshotsResponse.ProtoReflect.Descriptor instead.

func (*ListSnapshotsResponse) GetSnapshots

func (x *ListSnapshotsResponse) GetSnapshots() string

func (*ListSnapshotsResponse) ProtoMessage

func (*ListSnapshotsResponse) ProtoMessage()

func (*ListSnapshotsResponse) ProtoReflect

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

func (*ListSnapshotsResponse) Reset

func (x *ListSnapshotsResponse) Reset()

func (*ListSnapshotsResponse) String

func (x *ListSnapshotsResponse) String() string

type SSHAddressResponse

type SSHAddressResponse struct {

	// Host/IP used to SSH into the guest.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

SSHAddressResponse carries the guest SSH address.

func (*SSHAddressResponse) Descriptor deprecated

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

Deprecated: Use SSHAddressResponse.ProtoReflect.Descriptor instead.

func (*SSHAddressResponse) GetAddress

func (x *SSHAddressResponse) GetAddress() string

func (*SSHAddressResponse) ProtoMessage

func (*SSHAddressResponse) ProtoMessage()

func (*SSHAddressResponse) ProtoReflect

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

func (*SSHAddressResponse) Reset

func (x *SSHAddressResponse) Reset()

func (*SSHAddressResponse) String

func (x *SSHAddressResponse) String() string

type SetConfigRequest

type SetConfigRequest struct {

	// JSON-encoded limatype.Instance. JSON keeps it in sync with the Go type.
	InstanceConfigJson []byte `protobuf:"bytes,1,opt,name=instance_config_json,json=instanceConfigJson,proto3" json:"instance_config_json,omitempty"`
	// contains filtered or unexported fields
}

SetConfigRequest carries the instance configuration for Configure.

func (*SetConfigRequest) Descriptor deprecated

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

Deprecated: Use SetConfigRequest.ProtoReflect.Descriptor instead.

func (*SetConfigRequest) GetInstanceConfigJson

func (x *SetConfigRequest) GetInstanceConfigJson() []byte

func (*SetConfigRequest) ProtoMessage

func (*SetConfigRequest) ProtoMessage()

func (*SetConfigRequest) ProtoReflect

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

func (*SetConfigRequest) Reset

func (x *SetConfigRequest) Reset()

func (*SetConfigRequest) String

func (x *SetConfigRequest) String() string

type SetConfigResponse added in v2.2.0

type SetConfigResponse struct {

	// JSON-encoded limatype.Instance after Configure applied the driver's defaults
	// and validation. JSON keeps it in sync with the Go type.
	InstanceConfigJson []byte `protobuf:"bytes,1,opt,name=instance_config_json,json=instanceConfigJson,proto3" json:"instance_config_json,omitempty"`
	// contains filtered or unexported fields
}

SetConfigResponse carries the instance configuration after Configure applied the driver's defaults and validation. It is returned so the caller picks up those changes (the in-process interface mutates the instance in place).

func (*SetConfigResponse) Descriptor deprecated added in v2.2.0

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

Deprecated: Use SetConfigResponse.ProtoReflect.Descriptor instead.

func (*SetConfigResponse) GetInstanceConfigJson added in v2.2.0

func (x *SetConfigResponse) GetInstanceConfigJson() []byte

func (*SetConfigResponse) ProtoMessage added in v2.2.0

func (*SetConfigResponse) ProtoMessage()

func (*SetConfigResponse) ProtoReflect added in v2.2.0

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

func (*SetConfigResponse) Reset added in v2.2.0

func (x *SetConfigResponse) Reset()

func (*SetConfigResponse) String added in v2.2.0

func (x *SetConfigResponse) String() string

type StartResponse

type StartResponse struct {

	// True for the initial "started" message and the final "done" message, and
	// false for each streamed error.
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// Error message when success is false; empty otherwise.
	Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

StartResponse is a streamed response for the Start RPC. It mimics the errChan from pkg/driver/driver.go. The server sends an initial response with success=true once Start is initiated (this unblocks the client). If errors occur they are sent as success=false with the error field populated. When the error channel closes, a final success=true message is sent and the stream ends.

func (*StartResponse) Descriptor deprecated

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

Deprecated: Use StartResponse.ProtoReflect.Descriptor instead.

func (*StartResponse) GetError

func (x *StartResponse) GetError() string

func (*StartResponse) GetSuccess

func (x *StartResponse) GetSuccess() bool

func (*StartResponse) ProtoMessage

func (*StartResponse) ProtoMessage()

func (*StartResponse) ProtoReflect

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

func (*StartResponse) Reset

func (x *StartResponse) Reset()

func (*StartResponse) String

func (x *StartResponse) String() string

type UnimplementedDriverServer

type UnimplementedDriverServer struct{}

UnimplementedDriverServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedDriverServer) AdditionalSetupForSSH

func (UnimplementedDriverServer) ApplySnapshot

func (UnimplementedDriverServer) BootScripts

func (UnimplementedDriverServer) ChangeDisplayPassword

func (UnimplementedDriverServer) Configure

func (UnimplementedDriverServer) Create

func (UnimplementedDriverServer) CreateDisk

func (UnimplementedDriverServer) CreateSnapshot

func (UnimplementedDriverServer) Delete

func (UnimplementedDriverServer) DeleteSnapshot

func (UnimplementedDriverServer) ForwardGuestAgent

func (UnimplementedDriverServer) GetDisplayConnection

func (UnimplementedDriverServer) GuestAgentConn

func (UnimplementedDriverServer) Info

func (UnimplementedDriverServer) ListSnapshots

func (UnimplementedDriverServer) RunGUI

func (UnimplementedDriverServer) SSHAddress

func (UnimplementedDriverServer) Start

func (UnimplementedDriverServer) Stop

func (UnimplementedDriverServer) Validate

type UnsafeDriverServer

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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