Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterGuestServiceServer(s grpc.ServiceRegistrar, srv GuestServiceServer)
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetAddedLocalPorts() []*IPPort
- func (x *Event) GetErrors() []string
- func (x *Event) GetRemovedLocalPorts() []*IPPort
- func (x *Event) GetTime() *timestamppb.Timestamp
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type GuestServiceClient
- type GuestServiceServer
- type GuestService_GetEventsClient
- type GuestService_GetEventsServer
- type GuestService_PostInotifyClient
- type GuestService_PostInotifyServer
- type GuestService_TunnelClient
- type GuestService_TunnelServer
- type IPPort
- func (*IPPort) Descriptor() ([]byte, []int)deprecated
- func (x *IPPort) GetIp() string
- func (x *IPPort) GetPort() int32
- func (x *IPPort) GetProtocol() string
- func (x *IPPort) HostString() string
- func (*IPPort) ProtoMessage()
- func (x *IPPort) ProtoReflect() protoreflect.Message
- func (x *IPPort) Reset()
- func (x *IPPort) String() string
- type Info
- type Inotify
- type TunnelMessage
- func (*TunnelMessage) Descriptor() ([]byte, []int)deprecated
- func (x *TunnelMessage) GetData() []byte
- func (x *TunnelMessage) GetGuestAddr() string
- func (x *TunnelMessage) GetId() string
- func (x *TunnelMessage) GetProtocol() string
- func (x *TunnelMessage) GetUdpTargetAddr() string
- func (*TunnelMessage) ProtoMessage()
- func (x *TunnelMessage) ProtoReflect() protoreflect.Message
- func (x *TunnelMessage) Reset()
- func (x *TunnelMessage) String() string
- type UnimplementedGuestServiceServer
- func (UnimplementedGuestServiceServer) GetEvents(*emptypb.Empty, grpc.ServerStreamingServer[Event]) error
- func (UnimplementedGuestServiceServer) GetInfo(context.Context, *emptypb.Empty) (*Info, error)
- func (UnimplementedGuestServiceServer) PostInotify(grpc.ClientStreamingServer[Inotify, emptypb.Empty]) error
- func (UnimplementedGuestServiceServer) Tunnel(grpc.BidiStreamingServer[TunnelMessage, TunnelMessage]) error
- type UnsafeGuestServiceServer
Constants ¶
const ( GuestService_GetInfo_FullMethodName = "/GuestService/GetInfo" GuestService_GetEvents_FullMethodName = "/GuestService/GetEvents" GuestService_PostInotify_FullMethodName = "/GuestService/PostInotify" GuestService_Tunnel_FullMethodName = "/GuestService/Tunnel" )
Variables ¶
var File_guestservice_proto protoreflect.FileDescriptor
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) GetAddedLocalPorts ¶
func (*Event) GetRemovedLocalPorts ¶
func (*Event) GetTime ¶
func (x *Event) GetTime() *timestamppb.Timestamp
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
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.
func NewGuestServiceClient ¶
func NewGuestServiceClient(cc grpc.ClientConnInterface) GuestServiceClient
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) GetProtocol ¶
func (*IPPort) HostString ¶
func (*IPPort) ProtoMessage ¶
func (*IPPort) ProtoMessage()
func (*IPPort) ProtoReflect ¶
func (x *IPPort) ProtoReflect() protoreflect.Message
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) GetLocalPorts ¶
func (*Info) ProtoMessage ¶
func (*Info) ProtoMessage()
func (*Info) ProtoReflect ¶
func (x *Info) ProtoReflect() protoreflect.Message
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) GetMountPath ¶
func (*Inotify) GetTime ¶
func (x *Inotify) GetTime() *timestamppb.Timestamp
func (*Inotify) ProtoMessage ¶
func (*Inotify) ProtoMessage()
func (*Inotify) ProtoReflect ¶
func (x *Inotify) ProtoReflect() protoreflect.Message
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) GetEvents(*emptypb.Empty, grpc.ServerStreamingServer[Event]) error
func (UnimplementedGuestServiceServer) PostInotify ¶
func (UnimplementedGuestServiceServer) PostInotify(grpc.ClientStreamingServer[Inotify, emptypb.Empty]) error
func (UnimplementedGuestServiceServer) Tunnel ¶
func (UnimplementedGuestServiceServer) Tunnel(grpc.BidiStreamingServer[TunnelMessage, TunnelMessage]) error
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.