Documentation ¶
Index ¶
- Variables
- func RegisterTunnelServiceServer(s grpc.ServiceRegistrar, srv TunnelServiceServer)
- type Protocol
- type Tunnel
- func (*Tunnel) Descriptor() ([]byte, []int)deprecated
- func (x *Tunnel) GetIsServerInitiated() bool
- func (x *Tunnel) GetLocalHost() string
- func (x *Tunnel) GetLocalPort() int32
- func (x *Tunnel) GetProtocol() Protocol
- func (x *Tunnel) GetRemoteHost() string
- func (x *Tunnel) GetRemotePort() int32
- func (*Tunnel) ProtoMessage()
- func (x *Tunnel) ProtoReflect() protoreflect.Message
- func (x *Tunnel) Reset()
- func (x *Tunnel) String() string
- type TunnelGetPayload
- type TunnelList
- type TunnelMessage
- func (*TunnelMessage) Descriptor() ([]byte, []int)deprecated
- func (x *TunnelMessage) GetClosed() bool
- func (x *TunnelMessage) GetContent() []byte
- func (x *TunnelMessage) GetTunnel() *Tunnel
- func (*TunnelMessage) ProtoMessage()
- func (x *TunnelMessage) ProtoReflect() protoreflect.Message
- func (x *TunnelMessage) Reset()
- func (x *TunnelMessage) String() string
- type TunnelServiceClient
- type TunnelServiceServer
- type TunnelService_TunnelChatClient
- type TunnelService_TunnelChatServer
- type UnimplementedTunnelServiceServer
- type UnsafeTunnelServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( Protocol_name = map[int32]string{ 0: "tcp", 1: "udp", 2: "sctp", } Protocol_value = map[string]int32{ "tcp": 0, "udp": 1, "sctp": 2, } )
Enum value maps for Protocol.
var File_tunnel_proto protoreflect.FileDescriptor
var TunnelService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "tunnel.TunnelService", HandlerType: (*TunnelServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetClientInitiatedTunnels", Handler: _TunnelService_GetClientInitiatedTunnels_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "TunnelChat", Handler: _TunnelService_TunnelChat_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "tunnel.proto", }
TunnelService_ServiceDesc is the grpc.ServiceDesc for TunnelService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTunnelServiceServer ¶
func RegisterTunnelServiceServer(s grpc.ServiceRegistrar, srv TunnelServiceServer)
Types ¶
type Protocol ¶
type Protocol int32
func (Protocol) Descriptor ¶
func (Protocol) Descriptor() protoreflect.EnumDescriptor
func (Protocol) EnumDescriptor
deprecated
func (Protocol) Number ¶
func (x Protocol) Number() protoreflect.EnumNumber
func (Protocol) Type ¶
func (Protocol) Type() protoreflect.EnumType
type Tunnel ¶
type Tunnel struct { IsServerInitiated bool `protobuf:"varint,1,opt,name=isServerInitiated,proto3" json:"isServerInitiated,omitempty"` Protocol Protocol `protobuf:"varint,2,opt,name=protocol,proto3,enum=tunnel.Protocol" json:"protocol,omitempty"` RemoteHost string `protobuf:"bytes,3,opt,name=RemoteHost,proto3" json:"RemoteHost,omitempty"` RemotePort int32 `protobuf:"varint,4,opt,name=RemotePort,proto3" json:"RemotePort,omitempty"` LocalHost string `protobuf:"bytes,5,opt,name=LocalHost,proto3" json:"LocalHost,omitempty"` LocalPort int32 `protobuf:"varint,6,opt,name=LocalPort,proto3" json:"LocalPort,omitempty"` // contains filtered or unexported fields }
func (*Tunnel) Descriptor
deprecated
func (*Tunnel) GetIsServerInitiated ¶
func (*Tunnel) GetLocalHost ¶
func (*Tunnel) GetLocalPort ¶
func (*Tunnel) GetProtocol ¶
func (*Tunnel) GetRemoteHost ¶
func (*Tunnel) GetRemotePort ¶
func (*Tunnel) ProtoMessage ¶
func (*Tunnel) ProtoMessage()
func (*Tunnel) ProtoReflect ¶
func (x *Tunnel) ProtoReflect() protoreflect.Message
type TunnelGetPayload ¶
type TunnelGetPayload struct { ClientId string `protobuf:"bytes,1,opt,name=clientId,proto3" json:"clientId,omitempty"` // contains filtered or unexported fields }
func (*TunnelGetPayload) Descriptor
deprecated
func (*TunnelGetPayload) Descriptor() ([]byte, []int)
Deprecated: Use TunnelGetPayload.ProtoReflect.Descriptor instead.
func (*TunnelGetPayload) GetClientId ¶
func (x *TunnelGetPayload) GetClientId() string
func (*TunnelGetPayload) ProtoMessage ¶
func (*TunnelGetPayload) ProtoMessage()
func (*TunnelGetPayload) ProtoReflect ¶
func (x *TunnelGetPayload) ProtoReflect() protoreflect.Message
func (*TunnelGetPayload) Reset ¶
func (x *TunnelGetPayload) Reset()
func (*TunnelGetPayload) String ¶
func (x *TunnelGetPayload) String() string
type TunnelList ¶
type TunnelList struct { Tunnel []*Tunnel `protobuf:"bytes,1,rep,name=tunnel,proto3" json:"tunnel,omitempty"` // contains filtered or unexported fields }
func (*TunnelList) Descriptor
deprecated
func (*TunnelList) Descriptor() ([]byte, []int)
Deprecated: Use TunnelList.ProtoReflect.Descriptor instead.
func (*TunnelList) GetTunnel ¶
func (x *TunnelList) GetTunnel() []*Tunnel
func (*TunnelList) ProtoMessage ¶
func (*TunnelList) ProtoMessage()
func (*TunnelList) ProtoReflect ¶
func (x *TunnelList) ProtoReflect() protoreflect.Message
func (*TunnelList) Reset ¶
func (x *TunnelList) Reset()
func (*TunnelList) String ¶
func (x *TunnelList) String() string
type TunnelMessage ¶
type TunnelMessage struct { Content []byte `protobuf:"bytes,1,opt,name=content,proto3,oneof" json:"content,omitempty"` Tunnel *Tunnel `protobuf:"bytes,2,opt,name=tunnel,proto3" json:"tunnel,omitempty"` Closed bool `protobuf:"varint,3,opt,name=closed,proto3" json:"closed,omitempty"` // contains filtered or unexported fields }
func (*TunnelMessage) Descriptor
deprecated
func (*TunnelMessage) Descriptor() ([]byte, []int)
Deprecated: Use TunnelMessage.ProtoReflect.Descriptor instead.
func (*TunnelMessage) GetClosed ¶
func (x *TunnelMessage) GetClosed() bool
func (*TunnelMessage) GetContent ¶
func (x *TunnelMessage) GetContent() []byte
func (*TunnelMessage) GetTunnel ¶
func (x *TunnelMessage) GetTunnel() *Tunnel
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 TunnelServiceClient ¶
type TunnelServiceClient interface { GetClientInitiatedTunnels(ctx context.Context, in *TunnelGetPayload, opts ...grpc.CallOption) (*TunnelList, error) TunnelChat(ctx context.Context, opts ...grpc.CallOption) (TunnelService_TunnelChatClient, error) }
TunnelServiceClient is the client API for TunnelService 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 NewTunnelServiceClient ¶
func NewTunnelServiceClient(cc grpc.ClientConnInterface) TunnelServiceClient
type TunnelServiceServer ¶
type TunnelServiceServer interface { GetClientInitiatedTunnels(context.Context, *TunnelGetPayload) (*TunnelList, error) TunnelChat(TunnelService_TunnelChatServer) error // contains filtered or unexported methods }
TunnelServiceServer is the server API for TunnelService service. All implementations must embed UnimplementedTunnelServiceServer for forward compatibility
type TunnelService_TunnelChatClient ¶
type TunnelService_TunnelChatClient interface { Send(*TunnelMessage) error Recv() (*TunnelMessage, error) grpc.ClientStream }
type TunnelService_TunnelChatServer ¶
type TunnelService_TunnelChatServer interface { Send(*TunnelMessage) error Recv() (*TunnelMessage, error) grpc.ServerStream }
type UnimplementedTunnelServiceServer ¶
type UnimplementedTunnelServiceServer struct { }
UnimplementedTunnelServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedTunnelServiceServer) GetClientInitiatedTunnels ¶
func (UnimplementedTunnelServiceServer) GetClientInitiatedTunnels(context.Context, *TunnelGetPayload) (*TunnelList, error)
func (UnimplementedTunnelServiceServer) TunnelChat ¶
func (UnimplementedTunnelServiceServer) TunnelChat(TunnelService_TunnelChatServer) error
type UnsafeTunnelServiceServer ¶
type UnsafeTunnelServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTunnelServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TunnelServiceServer will result in compilation errors.