api

package
v2.0.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GuestService_GetInfo_FullMethodName     = "/GuestService/GetInfo"
	GuestService_GetEvents_FullMethodName   = "/GuestService/GetEvents"
	GuestService_PostInotify_FullMethodName = "/GuestService/PostInotify"
	GuestService_Tunnel_FullMethodName      = "/GuestService/Tunnel"
)

Variables

View Source
var File_guestservice_proto protoreflect.FileDescriptor
View Source
var GuestService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "GuestService",
	HandlerType: (*GuestServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetInfo",
			Handler:    _GuestService_GetInfo_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetEvents",
			Handler:       _GuestService_GetEvents_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "PostInotify",
			Handler:       _GuestService_PostInotify_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "Tunnel",
			Handler:       _GuestService_Tunnel_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "guestservice.proto",
}

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

Functions

func RegisterGuestServiceServer

func RegisterGuestServiceServer(s grpc.ServiceRegistrar, srv GuestServiceServer)

Types

type Event

type Event struct {
	Time              *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
	AddedLocalPorts   []*IPPort              `protobuf:"bytes,2,rep,name=added_local_ports,json=addedLocalPorts,proto3" json:"added_local_ports,omitempty"`
	RemovedLocalPorts []*IPPort              `protobuf:"bytes,3,rep,name=removed_local_ports,json=removedLocalPorts,proto3" json:"removed_local_ports,omitempty"`
	Errors            []string               `protobuf:"bytes,4,rep,name=errors,proto3" json:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*Event) Descriptor deprecated

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetAddedLocalPorts

func (x *Event) GetAddedLocalPorts() []*IPPort

func (*Event) GetErrors

func (x *Event) GetErrors() []string

func (*Event) GetRemovedLocalPorts

func (x *Event) GetRemovedLocalPorts() []*IPPort

func (*Event) GetTime

func (x *Event) GetTime() *timestamppb.Timestamp

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

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

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type GuestServiceClient

type GuestServiceClient interface {
	GetInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Info, error)
	GetEvents(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Event], error)
	PostInotify(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[Inotify, emptypb.Empty], error)
	Tunnel(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[TunnelMessage, TunnelMessage], error)
}

GuestServiceClient is the client API for GuestService 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 GuestServiceServer

type GuestServiceServer interface {
	GetInfo(context.Context, *emptypb.Empty) (*Info, error)
	GetEvents(*emptypb.Empty, grpc.ServerStreamingServer[Event]) error
	PostInotify(grpc.ClientStreamingServer[Inotify, emptypb.Empty]) error
	Tunnel(grpc.BidiStreamingServer[TunnelMessage, TunnelMessage]) error
	// contains filtered or unexported methods
}

GuestServiceServer is the server API for GuestService service. All implementations must embed UnimplementedGuestServiceServer for forward compatibility.

type GuestService_GetEventsClient

type GuestService_GetEventsClient = grpc.ServerStreamingClient[Event]

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

type GuestService_GetEventsServer

type GuestService_GetEventsServer = grpc.ServerStreamingServer[Event]

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

type GuestService_PostInotifyClient

type GuestService_PostInotifyClient = grpc.ClientStreamingClient[Inotify, emptypb.Empty]

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

type GuestService_PostInotifyServer

type GuestService_PostInotifyServer = grpc.ClientStreamingServer[Inotify, emptypb.Empty]

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

type GuestService_TunnelClient

type GuestService_TunnelClient = grpc.BidiStreamingClient[TunnelMessage, TunnelMessage]

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

type GuestService_TunnelServer

type GuestService_TunnelServer = grpc.BidiStreamingServer[TunnelMessage, TunnelMessage]

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

type IPPort

type IPPort struct {
	Protocol string `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"` // tcp, udp
	Ip       string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
	Port     int32  `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
	// contains filtered or unexported fields
}

func (*IPPort) Descriptor deprecated

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

Deprecated: Use IPPort.ProtoReflect.Descriptor instead.

func (*IPPort) GetIp

func (x *IPPort) GetIp() string

func (*IPPort) GetPort

func (x *IPPort) GetPort() int32

func (*IPPort) GetProtocol

func (x *IPPort) GetProtocol() string

func (*IPPort) HostString

func (x *IPPort) HostString() string

func (*IPPort) ProtoMessage

func (*IPPort) ProtoMessage()

func (*IPPort) ProtoReflect

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

func (*IPPort) Reset

func (x *IPPort) Reset()

func (*IPPort) String

func (x *IPPort) String() string

type Info

type Info struct {
	LocalPorts []*IPPort `protobuf:"bytes,1,rep,name=local_ports,json=localPorts,proto3" json:"local_ports,omitempty"`
	// contains filtered or unexported fields
}

func (*Info) Descriptor deprecated

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

Deprecated: Use Info.ProtoReflect.Descriptor instead.

func (*Info) GetLocalPorts

func (x *Info) GetLocalPorts() []*IPPort

func (*Info) ProtoMessage

func (*Info) ProtoMessage()

func (*Info) ProtoReflect

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

func (*Info) Reset

func (x *Info) Reset()

func (*Info) String

func (x *Info) String() string

type Inotify

type Inotify struct {
	MountPath string                 `protobuf:"bytes,1,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"`
	Time      *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

func (*Inotify) Descriptor deprecated

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

Deprecated: Use Inotify.ProtoReflect.Descriptor instead.

func (*Inotify) GetMountPath

func (x *Inotify) GetMountPath() string

func (*Inotify) GetTime

func (x *Inotify) GetTime() *timestamppb.Timestamp

func (*Inotify) ProtoMessage

func (*Inotify) ProtoMessage()

func (*Inotify) ProtoReflect

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

func (*Inotify) Reset

func (x *Inotify) Reset()

func (*Inotify) String

func (x *Inotify) String() string

type TunnelMessage

type TunnelMessage struct {
	Id            string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Protocol      string `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"` // tcp, udp
	Data          []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	GuestAddr     string `protobuf:"bytes,4,opt,name=guest_addr,json=guestAddr,proto3" json:"guest_addr,omitempty"`
	UdpTargetAddr string `protobuf:"bytes,5,opt,name=udp_target_addr,json=udpTargetAddr,proto3" json:"udp_target_addr,omitempty"`
	// contains filtered or unexported fields
}

func (*TunnelMessage) Descriptor deprecated

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

Deprecated: Use TunnelMessage.ProtoReflect.Descriptor instead.

func (*TunnelMessage) GetData

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

func (*TunnelMessage) GetGuestAddr

func (x *TunnelMessage) GetGuestAddr() string

func (*TunnelMessage) GetId

func (x *TunnelMessage) GetId() string

func (*TunnelMessage) GetProtocol

func (x *TunnelMessage) GetProtocol() string

func (*TunnelMessage) GetUdpTargetAddr

func (x *TunnelMessage) GetUdpTargetAddr() string

func (*TunnelMessage) ProtoMessage

func (*TunnelMessage) ProtoMessage()

func (*TunnelMessage) ProtoReflect

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

func (*TunnelMessage) Reset

func (x *TunnelMessage) Reset()

func (*TunnelMessage) String

func (x *TunnelMessage) String() string

type UnimplementedGuestServiceServer

type UnimplementedGuestServiceServer struct{}

UnimplementedGuestServiceServer 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 (UnimplementedGuestServiceServer) GetEvents

func (UnimplementedGuestServiceServer) GetInfo

func (UnimplementedGuestServiceServer) PostInotify

func (UnimplementedGuestServiceServer) Tunnel

type UnsafeGuestServiceServer

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

UnsafeGuestServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GuestServiceServer 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