guestv1

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GuestPodPlane_Attach_FullMethodName = "/weft.guest.v1.GuestPodPlane/Attach"
)

Variables

View Source
var (
	RestartPolicy_name = map[int32]string{
		0: "RESTART_NEVER",
		1: "RESTART_ON_FAILURE",
		2: "RESTART_ALWAYS",
	}
	RestartPolicy_value = map[string]int32{
		"RESTART_NEVER":      0,
		"RESTART_ON_FAILURE": 1,
		"RESTART_ALWAYS":     2,
	}
)

Enum value maps for RestartPolicy.

View Source
var (
	Stream_name = map[int32]string{
		0: "STREAM_UNSPECIFIED",
		1: "STREAM_STDOUT",
		2: "STREAM_STDERR",
	}
	Stream_value = map[string]int32{
		"STREAM_UNSPECIFIED": 0,
		"STREAM_STDOUT":      1,
		"STREAM_STDERR":      2,
	}
)

Enum value maps for Stream.

View Source
var File_guest_proto protoreflect.FileDescriptor
View Source
var GuestPodPlane_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "weft.guest.v1.GuestPodPlane",
	HandlerType: (*GuestPodPlaneServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Attach",
			Handler:       _GuestPodPlane_Attach_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "guest.proto",
}

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

Functions

func RegisterGuestPodPlaneServer

func RegisterGuestPodPlaneServer(s grpc.ServiceRegistrar, srv GuestPodPlaneServer)

Types

type Container

type Container struct {
	Id         string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	RootfsTag  string            `protobuf:"bytes,2,opt,name=rootfs_tag,json=rootfsTag,proto3" json:"rootfs_tag,omitempty"` // matches a Share.tag (virtio-fs) OR a path under /run/weft/rootfs/<id>
	Command    []string          `protobuf:"bytes,3,rep,name=command,proto3" json:"command,omitempty"`
	Args       []string          `protobuf:"bytes,4,rep,name=args,proto3" json:"args,omitempty"`
	Env        map[string]string `` /* 133-byte string literal not displayed */
	Workdir    string            `protobuf:"bytes,6,opt,name=workdir,proto3" json:"workdir,omitempty"`
	User       string            `protobuf:"bytes,7,opt,name=user,proto3" json:"user,omitempty"` // "uid:gid" or username
	Restart    RestartPolicy     `protobuf:"varint,8,opt,name=restart,proto3,enum=weft.guest.v1.RestartPolicy" json:"restart,omitempty"`
	Mounts     []*Mount          `protobuf:"bytes,9,rep,name=mounts,proto3" json:"mounts,omitempty"`
	Resources  *Resources        `protobuf:"bytes,10,opt,name=resources,proto3" json:"resources,omitempty"`
	Privileged bool              `protobuf:"varint,11,opt,name=privileged,proto3" json:"privileged,omitempty"`
	// contains filtered or unexported fields
}

func (*Container) Descriptor deprecated

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

Deprecated: Use Container.ProtoReflect.Descriptor instead.

func (*Container) GetArgs

func (x *Container) GetArgs() []string

func (*Container) GetCommand

func (x *Container) GetCommand() []string

func (*Container) GetEnv

func (x *Container) GetEnv() map[string]string

func (*Container) GetId

func (x *Container) GetId() string

func (*Container) GetMounts

func (x *Container) GetMounts() []*Mount

func (*Container) GetPrivileged

func (x *Container) GetPrivileged() bool

func (*Container) GetResources

func (x *Container) GetResources() *Resources

func (*Container) GetRestart

func (x *Container) GetRestart() RestartPolicy

func (*Container) GetRootfsTag

func (x *Container) GetRootfsTag() string

func (*Container) GetUser

func (x *Container) GetUser() string

func (*Container) GetWorkdir

func (x *Container) GetWorkdir() string

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 ContainerEvent

type ContainerEvent struct {
	Id     string           `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Kind   string           `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` // "created" | "started" | "exited" | "oom"
	Status *ContainerStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*ContainerEvent) Descriptor deprecated

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

Deprecated: Use ContainerEvent.ProtoReflect.Descriptor instead.

func (*ContainerEvent) GetId

func (x *ContainerEvent) GetId() string

func (*ContainerEvent) GetKind

func (x *ContainerEvent) GetKind() string

func (*ContainerEvent) GetStatus

func (x *ContainerEvent) GetStatus() *ContainerStatus

func (*ContainerEvent) ProtoMessage

func (*ContainerEvent) ProtoMessage()

func (*ContainerEvent) ProtoReflect

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

func (*ContainerEvent) Reset

func (x *ContainerEvent) Reset()

func (*ContainerEvent) String

func (x *ContainerEvent) String() string

type ContainerStatus

type ContainerStatus struct {
	Id           string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	State        string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` // "created" | "running" | "stopped"
	Pid          int32  `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"`
	ExitCode     int32  `protobuf:"varint,4,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
	Signaled     bool   `protobuf:"varint,5,opt,name=signaled,proto3" json:"signaled,omitempty"`
	Signal       int32  `protobuf:"varint,6,opt,name=signal,proto3" json:"signal,omitempty"`
	RestartCount int32  `protobuf:"varint,7,opt,name=restart_count,json=restartCount,proto3" json:"restart_count,omitempty"`
	StartedAtMs  int64  `protobuf:"varint,8,opt,name=started_at_ms,json=startedAtMs,proto3" json:"started_at_ms,omitempty"`
	ExitedAtMs   int64  `protobuf:"varint,9,opt,name=exited_at_ms,json=exitedAtMs,proto3" json:"exited_at_ms,omitempty"`
	// contains filtered or unexported fields
}

func (*ContainerStatus) Descriptor deprecated

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

Deprecated: Use ContainerStatus.ProtoReflect.Descriptor instead.

func (*ContainerStatus) GetExitCode

func (x *ContainerStatus) GetExitCode() int32

func (*ContainerStatus) GetExitedAtMs

func (x *ContainerStatus) GetExitedAtMs() int64

func (*ContainerStatus) GetId

func (x *ContainerStatus) GetId() string

func (*ContainerStatus) GetPid

func (x *ContainerStatus) GetPid() int32

func (*ContainerStatus) GetRestartCount

func (x *ContainerStatus) GetRestartCount() int32

func (*ContainerStatus) GetSignal

func (x *ContainerStatus) GetSignal() int32

func (*ContainerStatus) GetSignaled

func (x *ContainerStatus) GetSignaled() bool

func (*ContainerStatus) GetStartedAtMs

func (x *ContainerStatus) GetStartedAtMs() int64

func (*ContainerStatus) GetState

func (x *ContainerStatus) GetState() string

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 ControlRequest

type ControlRequest struct {
	CallId uint64 `protobuf:"varint,1,opt,name=call_id,json=callId,proto3" json:"call_id,omitempty"`
	// Types that are valid to be assigned to Op:
	//
	//	*ControlRequest_StopPod
	//	*ControlRequest_Kill
	//	*ControlRequest_Exec
	//	*ControlRequest_Update
	Op isControlRequest_Op `protobuf_oneof:"op"`
	// contains filtered or unexported fields
}

ControlRequest is host → guest. The guest answers with a matching ControlResponse carrying the same call_id.

func (*ControlRequest) Descriptor deprecated

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

Deprecated: Use ControlRequest.ProtoReflect.Descriptor instead.

func (*ControlRequest) GetCallId

func (x *ControlRequest) GetCallId() uint64

func (*ControlRequest) GetExec

func (x *ControlRequest) GetExec() *ExecInContainer

func (*ControlRequest) GetKill

func (x *ControlRequest) GetKill() *KillContainer

func (*ControlRequest) GetOp

func (x *ControlRequest) GetOp() isControlRequest_Op

func (*ControlRequest) GetStopPod

func (x *ControlRequest) GetStopPod() *StopPod

func (*ControlRequest) GetUpdate

func (x *ControlRequest) GetUpdate() *UpdateContainer

func (*ControlRequest) ProtoMessage

func (*ControlRequest) ProtoMessage()

func (*ControlRequest) ProtoReflect

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

func (*ControlRequest) Reset

func (x *ControlRequest) Reset()

func (*ControlRequest) String

func (x *ControlRequest) String() string

type ControlRequest_Exec

type ControlRequest_Exec struct {
	Exec *ExecInContainer `protobuf:"bytes,12,opt,name=exec,proto3,oneof"`
}

type ControlRequest_Kill

type ControlRequest_Kill struct {
	Kill *KillContainer `protobuf:"bytes,11,opt,name=kill,proto3,oneof"`
}

type ControlRequest_StopPod

type ControlRequest_StopPod struct {
	StopPod *StopPod `protobuf:"bytes,10,opt,name=stop_pod,json=stopPod,proto3,oneof"`
}

type ControlRequest_Update

type ControlRequest_Update struct {
	Update *UpdateContainer `protobuf:"bytes,13,opt,name=update,proto3,oneof"` // future: live restart with new env / cmd
}

type ControlResponse

type ControlResponse struct {
	CallId uint64 `protobuf:"varint,1,opt,name=call_id,json=callId,proto3" json:"call_id,omitempty"`
	Error  string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // empty on success
	// Types that are valid to be assigned to Payload:
	//
	//	*ControlResponse_ExecResult
	Payload isControlResponse_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

func (*ControlResponse) Descriptor deprecated

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

Deprecated: Use ControlResponse.ProtoReflect.Descriptor instead.

func (*ControlResponse) GetCallId

func (x *ControlResponse) GetCallId() uint64

func (*ControlResponse) GetError

func (x *ControlResponse) GetError() string

func (*ControlResponse) GetExecResult

func (x *ControlResponse) GetExecResult() *ExecResult

func (*ControlResponse) GetPayload

func (x *ControlResponse) GetPayload() isControlResponse_Payload

func (*ControlResponse) ProtoMessage

func (*ControlResponse) ProtoMessage()

func (*ControlResponse) ProtoReflect

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

func (*ControlResponse) Reset

func (x *ControlResponse) Reset()

func (*ControlResponse) String

func (x *ControlResponse) String() string

type ControlResponse_ExecResult

type ControlResponse_ExecResult struct {
	ExecResult *ExecResult `protobuf:"bytes,10,opt,name=exec_result,json=execResult,proto3,oneof"`
}

type CubeFSMount

type CubeFSMount struct {
	Volume    string   `protobuf:"bytes,1,opt,name=volume,proto3" json:"volume,omitempty"`
	Masters   []string `protobuf:"bytes,2,rep,name=masters,proto3" json:"masters,omitempty"` // master node "host:port" list
	Owner     string   `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
	AccessKey string   `protobuf:"bytes,4,opt,name=access_key,json=accessKey,proto3" json:"access_key,omitempty"`
	SecretKey string   `protobuf:"bytes,5,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"`
	Subdir    string   `protobuf:"bytes,6,opt,name=subdir,proto3" json:"subdir,omitempty"`
	// contains filtered or unexported fields
}

CubeFSMount is the CubeFS connection detail the in-guest cfs-client needs.

func (*CubeFSMount) Descriptor deprecated

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

Deprecated: Use CubeFSMount.ProtoReflect.Descriptor instead.

func (*CubeFSMount) GetAccessKey

func (x *CubeFSMount) GetAccessKey() string

func (*CubeFSMount) GetMasters

func (x *CubeFSMount) GetMasters() []string

func (*CubeFSMount) GetOwner

func (x *CubeFSMount) GetOwner() string

func (*CubeFSMount) GetSecretKey

func (x *CubeFSMount) GetSecretKey() string

func (*CubeFSMount) GetSubdir

func (x *CubeFSMount) GetSubdir() string

func (*CubeFSMount) GetVolume

func (x *CubeFSMount) GetVolume() string

func (*CubeFSMount) ProtoMessage

func (*CubeFSMount) ProtoMessage()

func (*CubeFSMount) ProtoReflect

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

func (*CubeFSMount) Reset

func (x *CubeFSMount) Reset()

func (*CubeFSMount) String

func (x *CubeFSMount) String() string

type ExecInContainer

type ExecInContainer struct {
	ContainerId string            `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
	Command     []string          `protobuf:"bytes,2,rep,name=command,proto3" json:"command,omitempty"`
	Env         map[string]string `` /* 133-byte string literal not displayed */
	Tty         bool              `protobuf:"varint,4,opt,name=tty,proto3" json:"tty,omitempty"`
	// contains filtered or unexported fields
}

func (*ExecInContainer) Descriptor deprecated

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

Deprecated: Use ExecInContainer.ProtoReflect.Descriptor instead.

func (*ExecInContainer) GetCommand

func (x *ExecInContainer) GetCommand() []string

func (*ExecInContainer) GetContainerId

func (x *ExecInContainer) GetContainerId() string

func (*ExecInContainer) GetEnv

func (x *ExecInContainer) GetEnv() map[string]string

func (*ExecInContainer) GetTty

func (x *ExecInContainer) GetTty() bool

func (*ExecInContainer) ProtoMessage

func (*ExecInContainer) ProtoMessage()

func (*ExecInContainer) ProtoReflect

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

func (*ExecInContainer) Reset

func (x *ExecInContainer) Reset()

func (*ExecInContainer) String

func (x *ExecInContainer) String() string

type ExecResult

type ExecResult struct {
	ExitCode int32  `protobuf:"varint,1,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
	Signaled bool   `protobuf:"varint,2,opt,name=signaled,proto3" json:"signaled,omitempty"`
	Stdout   []byte `protobuf:"bytes,3,opt,name=stdout,proto3" json:"stdout,omitempty"` // small payloads only ; streaming exec uses a future side-channel
	Stderr   []byte `protobuf:"bytes,4,opt,name=stderr,proto3" json:"stderr,omitempty"`
	// contains filtered or unexported fields
}

func (*ExecResult) Descriptor deprecated

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

Deprecated: Use ExecResult.ProtoReflect.Descriptor instead.

func (*ExecResult) GetExitCode

func (x *ExecResult) GetExitCode() int32

func (*ExecResult) GetSignaled

func (x *ExecResult) GetSignaled() bool

func (*ExecResult) GetStderr

func (x *ExecResult) GetStderr() []byte

func (*ExecResult) GetStdout

func (x *ExecResult) GetStdout() []byte

func (*ExecResult) ProtoMessage

func (*ExecResult) ProtoMessage()

func (*ExecResult) ProtoReflect

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

func (*ExecResult) Reset

func (x *ExecResult) Reset()

func (*ExecResult) String

func (x *ExecResult) String() string

type GuestFrame

type GuestFrame struct {

	// Types that are valid to be assigned to Body:
	//
	//	*GuestFrame_Hello
	//	*GuestFrame_HelloAck
	//	*GuestFrame_PodStatus
	//	*GuestFrame_CtrEvent
	//	*GuestFrame_Log
	//	*GuestFrame_ControlReq
	//	*GuestFrame_ControlResp
	Body isGuestFrame_Body `protobuf_oneof:"body"`
	// contains filtered or unexported fields
}

func (*GuestFrame) Descriptor deprecated

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

Deprecated: Use GuestFrame.ProtoReflect.Descriptor instead.

func (*GuestFrame) GetBody

func (x *GuestFrame) GetBody() isGuestFrame_Body

func (*GuestFrame) GetControlReq

func (x *GuestFrame) GetControlReq() *ControlRequest

func (*GuestFrame) GetControlResp

func (x *GuestFrame) GetControlResp() *ControlResponse

func (*GuestFrame) GetCtrEvent

func (x *GuestFrame) GetCtrEvent() *ContainerEvent

func (*GuestFrame) GetHello

func (x *GuestFrame) GetHello() *GuestHello

func (*GuestFrame) GetHelloAck

func (x *GuestFrame) GetHelloAck() *GuestHelloAck

func (*GuestFrame) GetLog

func (x *GuestFrame) GetLog() *LogChunk

func (*GuestFrame) GetPodStatus

func (x *GuestFrame) GetPodStatus() *PodStatus

func (*GuestFrame) ProtoMessage

func (*GuestFrame) ProtoMessage()

func (*GuestFrame) ProtoReflect

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

func (*GuestFrame) Reset

func (x *GuestFrame) Reset()

func (*GuestFrame) String

func (x *GuestFrame) String() string

type GuestFrame_ControlReq

type GuestFrame_ControlReq struct {
	ControlReq *ControlRequest `protobuf:"bytes,6,opt,name=control_req,json=controlReq,proto3,oneof"` // host → guest
}

type GuestFrame_ControlResp

type GuestFrame_ControlResp struct {
	ControlResp *ControlResponse `protobuf:"bytes,7,opt,name=control_resp,json=controlResp,proto3,oneof"` // guest → host
}

type GuestFrame_CtrEvent

type GuestFrame_CtrEvent struct {
	CtrEvent *ContainerEvent `protobuf:"bytes,4,opt,name=ctr_event,json=ctrEvent,proto3,oneof"` // guest → host, on every state change
}

type GuestFrame_Hello

type GuestFrame_Hello struct {
	Hello *GuestHello `protobuf:"bytes,1,opt,name=hello,proto3,oneof"` // guest → host, always first
}

type GuestFrame_HelloAck

type GuestFrame_HelloAck struct {
	HelloAck *GuestHelloAck `protobuf:"bytes,2,opt,name=hello_ack,json=helloAck,proto3,oneof"` // host → guest
}

type GuestFrame_Log

type GuestFrame_Log struct {
	Log *LogChunk `protobuf:"bytes,5,opt,name=log,proto3,oneof"` // guest → host, stream of stdio
}

type GuestFrame_PodStatus

type GuestFrame_PodStatus struct {
	PodStatus *PodStatus `protobuf:"bytes,3,opt,name=pod_status,json=podStatus,proto3,oneof"` // guest → host, periodic
}

type GuestHello

type GuestHello struct {
	PodId        string `protobuf:"bytes,1,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"`
	InitVersion  string `protobuf:"bytes,2,opt,name=init_version,json=initVersion,proto3" json:"init_version,omitempty"` // build SHA / semver of weft-init
	Kernel       string `protobuf:"bytes,3,opt,name=kernel,proto3" json:"kernel,omitempty"`                              // uname -r
	Architecture string `protobuf:"bytes,4,opt,name=architecture,proto3" json:"architecture,omitempty"`                  // "amd64" | "arm64"
	// reported_cid is the AF_VSOCK guest CID the guest reads from its
	// own kernel via IOCTL_VM_SOCKETS_GET_LOCAL_CID on /dev/vsock.
	// The host cross-checks it against the peer's actual CID (from
	// the gRPC peer.Addr) and refuses the stream when the two
	// disagree — defense-in-depth against a malicious guest trying
	// to claim a different pod's CID. Also lifts the v0.4.46 VZ
	// readback limitation : on Apple-VZ-backed microVMs the host
	// can't query the framework for the assigned CID, but the GUEST
	// can read it from its own kernel and report it here, letting
	// the host populate its podCIDs registry on first Hello. 0 =
	// not reported (older guests / non-Linux builds).
	ReportedCid uint32 `protobuf:"varint,5,opt,name=reported_cid,json=reportedCid,proto3" json:"reported_cid,omitempty"`
	// contains filtered or unexported fields
}

func (*GuestHello) Descriptor deprecated

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

Deprecated: Use GuestHello.ProtoReflect.Descriptor instead.

func (*GuestHello) GetArchitecture

func (x *GuestHello) GetArchitecture() string

func (*GuestHello) GetInitVersion

func (x *GuestHello) GetInitVersion() string

func (*GuestHello) GetKernel

func (x *GuestHello) GetKernel() string

func (*GuestHello) GetPodId

func (x *GuestHello) GetPodId() string

func (*GuestHello) GetReportedCid added in v0.16.0

func (x *GuestHello) GetReportedCid() uint32

func (*GuestHello) ProtoMessage

func (*GuestHello) ProtoMessage()

func (*GuestHello) ProtoReflect

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

func (*GuestHello) Reset

func (x *GuestHello) Reset()

func (*GuestHello) String

func (x *GuestHello) String() string

type GuestHelloAck

type GuestHelloAck struct {

	// The host's authoritative PodSpec ; the guest reconciles its
	// view against this. If the spec embedded at boot (cloud-init
	// ISO / virtio-fs / cmdline) is already current, this echoes
	// it back ; if the host has a newer revision, the guest
	// applies the delta.
	Spec *PodSpec `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"`
	// contains filtered or unexported fields
}

func (*GuestHelloAck) Descriptor deprecated

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

Deprecated: Use GuestHelloAck.ProtoReflect.Descriptor instead.

func (*GuestHelloAck) GetSpec

func (x *GuestHelloAck) GetSpec() *PodSpec

func (*GuestHelloAck) ProtoMessage

func (*GuestHelloAck) ProtoMessage()

func (*GuestHelloAck) ProtoReflect

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

func (*GuestHelloAck) Reset

func (x *GuestHelloAck) Reset()

func (*GuestHelloAck) String

func (x *GuestHelloAck) String() string

type GuestPodPlaneClient

type GuestPodPlaneClient interface {
	Attach(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[GuestFrame, GuestFrame], error)
}

GuestPodPlaneClient is the client API for GuestPodPlane 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.

type GuestPodPlaneServer

type GuestPodPlaneServer interface {
	Attach(grpc.BidiStreamingServer[GuestFrame, GuestFrame]) error
	// contains filtered or unexported methods
}

GuestPodPlaneServer is the server API for GuestPodPlane service. All implementations must embed UnimplementedGuestPodPlaneServer for forward compatibility.

type GuestPodPlane_AttachClient

type GuestPodPlane_AttachClient = grpc.BidiStreamingClient[GuestFrame, GuestFrame]

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

type GuestPodPlane_AttachServer

type GuestPodPlane_AttachServer = grpc.BidiStreamingServer[GuestFrame, GuestFrame]

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

type KillContainer

type KillContainer struct {
	ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
	Signal      string `protobuf:"bytes,2,opt,name=signal,proto3" json:"signal,omitempty"` // "TERM" | "KILL" | …
	// contains filtered or unexported fields
}

func (*KillContainer) Descriptor deprecated

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

Deprecated: Use KillContainer.ProtoReflect.Descriptor instead.

func (*KillContainer) GetContainerId

func (x *KillContainer) GetContainerId() string

func (*KillContainer) GetSignal

func (x *KillContainer) GetSignal() string

func (*KillContainer) ProtoMessage

func (*KillContainer) ProtoMessage()

func (*KillContainer) ProtoReflect

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

func (*KillContainer) Reset

func (x *KillContainer) Reset()

func (*KillContainer) String

func (x *KillContainer) String() string

type LogChunk

type LogChunk struct {
	ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
	Stream      Stream `protobuf:"varint,2,opt,name=stream,proto3,enum=weft.guest.v1.Stream" json:"stream,omitempty"`
	Data        []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	TimestampMs int64  `protobuf:"varint,4,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"`
	// contains filtered or unexported fields
}

func (*LogChunk) Descriptor deprecated

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

Deprecated: Use LogChunk.ProtoReflect.Descriptor instead.

func (*LogChunk) GetContainerId

func (x *LogChunk) GetContainerId() string

func (*LogChunk) GetData

func (x *LogChunk) GetData() []byte

func (*LogChunk) GetStream

func (x *LogChunk) GetStream() Stream

func (*LogChunk) GetTimestampMs

func (x *LogChunk) GetTimestampMs() int64

func (*LogChunk) ProtoMessage

func (*LogChunk) ProtoMessage()

func (*LogChunk) ProtoReflect

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

func (*LogChunk) Reset

func (x *LogChunk) Reset()

func (*LogChunk) String

func (x *LogChunk) String() string

type Mount

type Mount struct {
	Source      string   `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
	Destination string   `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"`
	Type        string   `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	Options     []string `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*Mount) Descriptor deprecated

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

Deprecated: Use Mount.ProtoReflect.Descriptor instead.

func (*Mount) GetDestination

func (x *Mount) GetDestination() string

func (*Mount) GetOptions

func (x *Mount) GetOptions() []string

func (*Mount) GetSource

func (x *Mount) GetSource() string

func (*Mount) GetType

func (x *Mount) GetType() string

func (*Mount) ProtoMessage

func (*Mount) ProtoMessage()

func (*Mount) ProtoReflect

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

func (*Mount) Reset

func (x *Mount) Reset()

func (*Mount) String

func (x *Mount) String() string

type Network

type Network struct {
	Interface string   `protobuf:"bytes,1,opt,name=interface,proto3" json:"interface,omitempty"` // default "eth0"
	Address   string   `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`     // CIDR, e.g. "10.0.2.15/24"
	Gateway   string   `protobuf:"bytes,3,opt,name=gateway,proto3" json:"gateway,omitempty"`
	Dns       []string `protobuf:"bytes,4,rep,name=dns,proto3" json:"dns,omitempty"`
	Hostname  string   `protobuf:"bytes,5,opt,name=hostname,proto3" json:"hostname,omitempty"`
	// contains filtered or unexported fields
}

func (*Network) Descriptor deprecated

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

Deprecated: Use Network.ProtoReflect.Descriptor instead.

func (*Network) GetAddress

func (x *Network) GetAddress() string

func (*Network) GetDns

func (x *Network) GetDns() []string

func (*Network) GetGateway

func (x *Network) GetGateway() string

func (*Network) GetHostname

func (x *Network) GetHostname() string

func (*Network) GetInterface

func (x *Network) GetInterface() string

func (*Network) ProtoMessage

func (*Network) ProtoMessage()

func (*Network) ProtoReflect

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

func (*Network) Reset

func (x *Network) Reset()

func (*Network) String

func (x *Network) String() string

type PodSpec

type PodSpec struct {
	PodId       string            `protobuf:"bytes,1,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"`
	Containers  []*Container      `protobuf:"bytes,2,rep,name=containers,proto3" json:"containers,omitempty"`
	Shares      []*Share          `protobuf:"bytes,3,rep,name=shares,proto3" json:"shares,omitempty"`
	Network     *Network          `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"`
	Properties  map[string]string `` /* 147-byte string literal not displayed */
	Wireguard   *WireGuard        `protobuf:"bytes,6,opt,name=wireguard,proto3" json:"wireguard,omitempty"`
	ShareMounts []*ShareMount     `protobuf:"bytes,7,rep,name=share_mounts,json=shareMounts,proto3" json:"share_mounts,omitempty"`
	// contains filtered or unexported fields
}

func (*PodSpec) Descriptor deprecated

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

Deprecated: Use PodSpec.ProtoReflect.Descriptor instead.

func (*PodSpec) GetContainers

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

func (*PodSpec) GetNetwork

func (x *PodSpec) GetNetwork() *Network

func (*PodSpec) GetPodId

func (x *PodSpec) GetPodId() string

func (*PodSpec) GetProperties

func (x *PodSpec) GetProperties() map[string]string

func (*PodSpec) GetShareMounts

func (x *PodSpec) GetShareMounts() []*ShareMount

func (*PodSpec) GetShares

func (x *PodSpec) GetShares() []*Share

func (*PodSpec) GetWireguard

func (x *PodSpec) GetWireguard() *WireGuard

func (*PodSpec) ProtoMessage

func (*PodSpec) ProtoMessage()

func (*PodSpec) ProtoReflect

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

func (*PodSpec) Reset

func (x *PodSpec) Reset()

func (*PodSpec) String

func (x *PodSpec) String() string

type PodStatus

type PodStatus struct {
	PodId      string             `protobuf:"bytes,1,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"`
	Containers []*ContainerStatus `protobuf:"bytes,2,rep,name=containers,proto3" json:"containers,omitempty"`
	UptimeMs   uint64             `protobuf:"varint,3,opt,name=uptime_ms,json=uptimeMs,proto3" json:"uptime_ms,omitempty"`
	// contains filtered or unexported fields
}

func (*PodStatus) Descriptor deprecated

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

Deprecated: Use PodStatus.ProtoReflect.Descriptor instead.

func (*PodStatus) GetContainers

func (x *PodStatus) GetContainers() []*ContainerStatus

func (*PodStatus) GetPodId

func (x *PodStatus) GetPodId() string

func (*PodStatus) GetUptimeMs

func (x *PodStatus) GetUptimeMs() uint64

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 Resources

type Resources struct {
	CpuShares uint64 `protobuf:"varint,1,opt,name=cpu_shares,json=cpuShares,proto3" json:"cpu_shares,omitempty"`
	MemBytes  uint64 `protobuf:"varint,2,opt,name=mem_bytes,json=memBytes,proto3" json:"mem_bytes,omitempty"`
	PidsMax   int64  `protobuf:"varint,3,opt,name=pids_max,json=pidsMax,proto3" json:"pids_max,omitempty"`
	// contains filtered or unexported fields
}

func (*Resources) Descriptor deprecated

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

Deprecated: Use Resources.ProtoReflect.Descriptor instead.

func (*Resources) GetCpuShares

func (x *Resources) GetCpuShares() uint64

func (*Resources) GetMemBytes

func (x *Resources) GetMemBytes() uint64

func (*Resources) GetPidsMax

func (x *Resources) GetPidsMax() int64

func (*Resources) ProtoMessage

func (*Resources) ProtoMessage()

func (*Resources) ProtoReflect

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

func (*Resources) Reset

func (x *Resources) Reset()

func (*Resources) String

func (x *Resources) String() string

type RestartPolicy

type RestartPolicy int32
const (
	RestartPolicy_RESTART_NEVER      RestartPolicy = 0
	RestartPolicy_RESTART_ON_FAILURE RestartPolicy = 1
	RestartPolicy_RESTART_ALWAYS     RestartPolicy = 2
)

func (RestartPolicy) Descriptor

func (RestartPolicy) Enum

func (x RestartPolicy) Enum() *RestartPolicy

func (RestartPolicy) EnumDescriptor deprecated

func (RestartPolicy) EnumDescriptor() ([]byte, []int)

Deprecated: Use RestartPolicy.Descriptor instead.

func (RestartPolicy) Number

func (RestartPolicy) String

func (x RestartPolicy) String() string

func (RestartPolicy) Type

type Share

type Share struct {
	Tag        string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
	MountPoint string `protobuf:"bytes,2,opt,name=mount_point,json=mountPoint,proto3" json:"mount_point,omitempty"`
	Readonly   bool   `protobuf:"varint,3,opt,name=readonly,proto3" json:"readonly,omitempty"`
	// contains filtered or unexported fields
}

func (*Share) Descriptor deprecated

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

Deprecated: Use Share.ProtoReflect.Descriptor instead.

func (*Share) GetMountPoint

func (x *Share) GetMountPoint() string

func (*Share) GetReadonly

func (x *Share) GetReadonly() bool

func (*Share) GetTag

func (x *Share) GetTag() string

func (*Share) ProtoMessage

func (*Share) ProtoMessage()

func (*Share) ProtoReflect

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

func (*Share) Reset

func (x *Share) Reset()

func (*Share) String

func (x *Share) String() string

type ShareMount

type ShareMount struct {
	Id         string       `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Action     string       `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"`   // "" / "mount" | "unmount"
	Backend    string       `protobuf:"bytes,3,opt,name=backend,proto3" json:"backend,omitempty"` // "cubefs" (default)
	MountPoint string       `protobuf:"bytes,4,opt,name=mount_point,json=mountPoint,proto3" json:"mount_point,omitempty"`
	Readonly   bool         `protobuf:"varint,5,opt,name=readonly,proto3" json:"readonly,omitempty"`
	Cubefs     *CubeFSMount `protobuf:"bytes,6,opt,name=cubefs,proto3" json:"cubefs,omitempty"`
	// contains filtered or unexported fields
}

ShareMount is one multi-attach POSIX share (CubeFS-backed) mounted in the guest. Doubles as the dynamic mount/unmount payload an operator publishes on the event bus. Mirrors weft-microvm-init/pkg/pod.ShareMount. (Note: the dynamic path travels as JSON on NATS, not protobuf; this message keeps the on-wire PodSpec a faithful mirror for GuestHelloAck.)

func (*ShareMount) Descriptor deprecated

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

Deprecated: Use ShareMount.ProtoReflect.Descriptor instead.

func (*ShareMount) GetAction

func (x *ShareMount) GetAction() string

func (*ShareMount) GetBackend

func (x *ShareMount) GetBackend() string

func (*ShareMount) GetCubefs

func (x *ShareMount) GetCubefs() *CubeFSMount

func (*ShareMount) GetId

func (x *ShareMount) GetId() string

func (*ShareMount) GetMountPoint

func (x *ShareMount) GetMountPoint() string

func (*ShareMount) GetReadonly

func (x *ShareMount) GetReadonly() bool

func (*ShareMount) ProtoMessage

func (*ShareMount) ProtoMessage()

func (*ShareMount) ProtoReflect

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

func (*ShareMount) Reset

func (x *ShareMount) Reset()

func (*ShareMount) String

func (x *ShareMount) String() string

type StopPod

type StopPod struct {
	GraceSeconds uint32 `protobuf:"varint,1,opt,name=grace_seconds,json=graceSeconds,proto3" json:"grace_seconds,omitempty"`
	// contains filtered or unexported fields
}

func (*StopPod) Descriptor deprecated

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

Deprecated: Use StopPod.ProtoReflect.Descriptor instead.

func (*StopPod) GetGraceSeconds

func (x *StopPod) GetGraceSeconds() uint32

func (*StopPod) ProtoMessage

func (*StopPod) ProtoMessage()

func (*StopPod) ProtoReflect

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

func (*StopPod) Reset

func (x *StopPod) Reset()

func (*StopPod) String

func (x *StopPod) String() string

type Stream

type Stream int32
const (
	Stream_STREAM_UNSPECIFIED Stream = 0
	Stream_STREAM_STDOUT      Stream = 1
	Stream_STREAM_STDERR      Stream = 2
)

func (Stream) Descriptor

func (Stream) Descriptor() protoreflect.EnumDescriptor

func (Stream) Enum

func (x Stream) Enum() *Stream

func (Stream) EnumDescriptor deprecated

func (Stream) EnumDescriptor() ([]byte, []int)

Deprecated: Use Stream.Descriptor instead.

func (Stream) Number

func (x Stream) Number() protoreflect.EnumNumber

func (Stream) String

func (x Stream) String() string

func (Stream) Type

func (Stream) Type() protoreflect.EnumType

type UnimplementedGuestPodPlaneServer

type UnimplementedGuestPodPlaneServer struct{}

UnimplementedGuestPodPlaneServer 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 (UnimplementedGuestPodPlaneServer) Attach

type UnsafeGuestPodPlaneServer

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

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

type UpdateContainer

type UpdateContainer struct {
	ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
	// command, if non-empty, replaces the container's command line.
	Command []string `protobuf:"bytes,2,rep,name=command,proto3" json:"command,omitempty"`
	// env merges over the container's existing env ; empty value
	// unsets a key.
	Env map[string]string `` /* 133-byte string literal not displayed */
	// contains filtered or unexported fields
}

UpdateContainer is the future live-restart op : swap a container's env / command without a full pod restart. The body is intentionally minimal today ; flesh out when the runtime grows the matching API (weft-init has no live-update path yet).

func (*UpdateContainer) Descriptor deprecated

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

Deprecated: Use UpdateContainer.ProtoReflect.Descriptor instead.

func (*UpdateContainer) GetCommand

func (x *UpdateContainer) GetCommand() []string

func (*UpdateContainer) GetContainerId

func (x *UpdateContainer) GetContainerId() string

func (*UpdateContainer) GetEnv

func (x *UpdateContainer) GetEnv() map[string]string

func (*UpdateContainer) ProtoMessage

func (*UpdateContainer) ProtoMessage()

func (*UpdateContainer) ProtoReflect

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

func (*UpdateContainer) Reset

func (x *UpdateContainer) Reset()

func (*UpdateContainer) String

func (x *UpdateContainer) String() string

type WGPeer

type WGPeer struct {
	PublicKey           string   `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`                                // base64, 32 bytes
	Endpoint            string   `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"`                                                   // underlay "host:port"
	AllowedIps          []string `protobuf:"bytes,3,rep,name=allowed_ips,json=allowedIps,proto3" json:"allowed_ips,omitempty"`                             // overlay CIDRs routed to this peer
	PersistentKeepalive uint32   `protobuf:"varint,4,opt,name=persistent_keepalive,json=persistentKeepalive,proto3" json:"persistent_keepalive,omitempty"` // seconds; 0 = disabled
	// contains filtered or unexported fields
}

func (*WGPeer) Descriptor deprecated

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

Deprecated: Use WGPeer.ProtoReflect.Descriptor instead.

func (*WGPeer) GetAllowedIps

func (x *WGPeer) GetAllowedIps() []string

func (*WGPeer) GetEndpoint

func (x *WGPeer) GetEndpoint() string

func (*WGPeer) GetPersistentKeepalive

func (x *WGPeer) GetPersistentKeepalive() uint32

func (*WGPeer) GetPublicKey

func (x *WGPeer) GetPublicKey() string

func (*WGPeer) ProtoMessage

func (*WGPeer) ProtoMessage()

func (*WGPeer) ProtoReflect

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

func (*WGPeer) Reset

func (x *WGPeer) Reset()

func (*WGPeer) String

func (x *WGPeer) String() string

type WireGuard

type WireGuard struct {
	Interface  string    `protobuf:"bytes,1,opt,name=interface,proto3" json:"interface,omitempty"`                      // default "wg0"
	PrivateKey string    `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`  // base64, 32 bytes
	ListenPort uint32    `protobuf:"varint,3,opt,name=listen_port,json=listenPort,proto3" json:"listen_port,omitempty"` // UDP underlay port; 0 = ephemeral
	Address    string    `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`                          // overlay CIDR, e.g. "10.9.0.1/24"
	Peers      []*WGPeer `protobuf:"bytes,5,rep,name=peers,proto3" json:"peers,omitempty"`
	// contains filtered or unexported fields
}

WireGuard is the optional kernel WireGuard overlay weft-init brings up after eth0. Keys are base64-encoded 32-byte Curve25519 values. Mirrors weft-microvm-init/pkg/pod.WireGuard.

func (*WireGuard) Descriptor deprecated

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

Deprecated: Use WireGuard.ProtoReflect.Descriptor instead.

func (*WireGuard) GetAddress

func (x *WireGuard) GetAddress() string

func (*WireGuard) GetInterface

func (x *WireGuard) GetInterface() string

func (*WireGuard) GetListenPort

func (x *WireGuard) GetListenPort() uint32

func (*WireGuard) GetPeers

func (x *WireGuard) GetPeers() []*WGPeer

func (*WireGuard) GetPrivateKey

func (x *WireGuard) GetPrivateKey() string

func (*WireGuard) ProtoMessage

func (*WireGuard) ProtoMessage()

func (*WireGuard) ProtoReflect

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

func (*WireGuard) Reset

func (x *WireGuard) Reset()

func (*WireGuard) String

func (x *WireGuard) String() string

Jump to

Keyboard shortcuts

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