v1alpha1

package
v0.0.0-...-1a3e84a Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package v1alpha1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	MicroVMSSHProxy_SSHProxy_FullMethodName = "/microvmsshproxy.services.api.v1alpha1.MicroVMSSHProxy/SSHProxy"
)

Variables

View Source
var File_services_microvmsshproxy_v1alpha1_microvmsshproxy_proto protoreflect.FileDescriptor
View Source
var MicroVMSSHProxy_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "microvmsshproxy.services.api.v1alpha1.MicroVMSSHProxy",
	HandlerType: (*MicroVMSSHProxyServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SSHProxy",
			Handler:       _MicroVMSSHProxy_SSHProxy_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "services/microvmsshproxy/v1alpha1/microvmsshproxy.proto",
}

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

Functions

func RegisterMicroVMSSHProxyHandler

func RegisterMicroVMSSHProxyHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterMicroVMSSHProxyHandler registers the http handlers for service MicroVMSSHProxy to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMicroVMSSHProxyHandlerClient

func RegisterMicroVMSSHProxyHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MicroVMSSHProxyClient) error

RegisterMicroVMSSHProxyHandlerClient registers the http handlers for service MicroVMSSHProxy to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MicroVMSSHProxyClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MicroVMSSHProxyClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MicroVMSSHProxyClient" to call the correct interceptors. This client ignores the HTTP middlewares.

func RegisterMicroVMSSHProxyHandlerFromEndpoint

func RegisterMicroVMSSHProxyHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterMicroVMSSHProxyHandlerFromEndpoint is same as RegisterMicroVMSSHProxyHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterMicroVMSSHProxyHandlerServer

func RegisterMicroVMSSHProxyHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MicroVMSSHProxyServer) error

RegisterMicroVMSSHProxyHandlerServer registers the http handlers for service MicroVMSSHProxy to "mux". UnaryRPC :call MicroVMSSHProxyServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMicroVMSSHProxyHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.

func RegisterMicroVMSSHProxyServer

func RegisterMicroVMSSHProxyServer(s grpc.ServiceRegistrar, srv MicroVMSSHProxyServer)

Types

type MicroVMSSHProxyClient

type MicroVMSSHProxyClient interface {
	SSHProxy(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[SSHProxyRequest, SSHProxyResponse], error)
}

MicroVMSSHProxyClient is the client API for MicroVMSSHProxy 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.

MicroVMSSHProxy tunnels a raw byte stream to a microvm's guest-agent ssh port, which itself proxies straight to the guest's local sshd - the agent performs no authentication of its own; sshd owns auth, PTY and SFTP. It requires the target microvm to have been created with AllowGuestAgent set, to be in the created state, and for the server to have been started with ssh proxying enabled.

type MicroVMSSHProxyServer

type MicroVMSSHProxyServer interface {
	SSHProxy(grpc.BidiStreamingServer[SSHProxyRequest, SSHProxyResponse]) error
}

MicroVMSSHProxyServer is the server API for MicroVMSSHProxy service. All implementations should embed UnimplementedMicroVMSSHProxyServer for forward compatibility.

MicroVMSSHProxy tunnels a raw byte stream to a microvm's guest-agent ssh port, which itself proxies straight to the guest's local sshd - the agent performs no authentication of its own; sshd owns auth, PTY and SFTP. It requires the target microvm to have been created with AllowGuestAgent set, to be in the created state, and for the server to have been started with ssh proxying enabled.

type MicroVMSSHProxy_SSHProxyClient

type MicroVMSSHProxy_SSHProxyClient = grpc.BidiStreamingClient[SSHProxyRequest, SSHProxyResponse]

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

type MicroVMSSHProxy_SSHProxyServer

type MicroVMSSHProxy_SSHProxyServer = grpc.BidiStreamingServer[SSHProxyRequest, SSHProxyResponse]

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

type SSHProxyRequest

type SSHProxyRequest struct {

	// Types that are valid to be assigned to Payload:
	//
	//	*SSHProxyRequest_Uid
	//	*SSHProxyRequest_Data
	Payload isSSHProxyRequest_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

SSHProxyRequest is one message in the client->server stream. The first message on a stream must carry uid; all following messages carry data bytes to forward toward the guest's sshd.

func (*SSHProxyRequest) Descriptor deprecated

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

Deprecated: Use SSHProxyRequest.ProtoReflect.Descriptor instead.

func (*SSHProxyRequest) GetData

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

func (*SSHProxyRequest) GetPayload

func (x *SSHProxyRequest) GetPayload() isSSHProxyRequest_Payload

func (*SSHProxyRequest) GetUid

func (x *SSHProxyRequest) GetUid() string

func (*SSHProxyRequest) ProtoMessage

func (*SSHProxyRequest) ProtoMessage()

func (*SSHProxyRequest) ProtoReflect

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

func (*SSHProxyRequest) Reset

func (x *SSHProxyRequest) Reset()

func (*SSHProxyRequest) String

func (x *SSHProxyRequest) String() string

type SSHProxyRequest_Data

type SSHProxyRequest_Data struct {
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3,oneof"`
}

type SSHProxyRequest_Uid

type SSHProxyRequest_Uid struct {
	// uid is the microvm identifier, as used by MicroVM.GetMicroVM/DeleteMicroVM.
	Uid string `protobuf:"bytes,1,opt,name=uid,proto3,oneof"`
}

type SSHProxyResponse

type SSHProxyResponse struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

SSHProxyResponse carries raw bytes received from the guest's sshd.

func (*SSHProxyResponse) Descriptor deprecated

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

Deprecated: Use SSHProxyResponse.ProtoReflect.Descriptor instead.

func (*SSHProxyResponse) GetData

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

func (*SSHProxyResponse) ProtoMessage

func (*SSHProxyResponse) ProtoMessage()

func (*SSHProxyResponse) ProtoReflect

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

func (*SSHProxyResponse) Reset

func (x *SSHProxyResponse) Reset()

func (*SSHProxyResponse) String

func (x *SSHProxyResponse) String() string

type UnimplementedMicroVMSSHProxyServer

type UnimplementedMicroVMSSHProxyServer struct{}

UnimplementedMicroVMSSHProxyServer should 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 (UnimplementedMicroVMSSHProxyServer) SSHProxy

type UnsafeMicroVMSSHProxyServer

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

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

Jump to

Keyboard shortcuts

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