Documentation ¶
Index ¶
- Variables
- func RegisterTunnelServer(s grpc.ServiceRegistrar, srv TunnelServer)
- type HandshakeRequest
- type HandshakeResponse
- func (*HandshakeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HandshakeResponse) GetRemoteBind() string
- func (x *HandshakeResponse) GetTunnelID() uint64
- func (*HandshakeResponse) ProtoMessage()
- func (x *HandshakeResponse) ProtoReflect() protoreflect.Message
- func (x *HandshakeResponse) Reset()
- func (x *HandshakeResponse) String() string
- type Packet
- func (*Packet) Descriptor() ([]byte, []int)deprecated
- func (x *Packet) GetConnID() uint64
- func (x *Packet) GetNewConnection() bool
- func (x *Packet) GetPayload() []byte
- func (x *Packet) GetTunnelID() uint64
- func (*Packet) ProtoMessage()
- func (x *Packet) ProtoReflect() protoreflect.Message
- func (x *Packet) Reset()
- func (x *Packet) String() string
- type TunnelClient
- type TunnelServer
- type Tunnel_MuxClient
- type Tunnel_MuxServer
- type UnimplementedTunnelServer
- type UnsafeTunnelServer
Constants ¶
This section is empty.
Variables ¶
var File_internal_protocol_protocol_proto protoreflect.FileDescriptor
var Tunnel_ServiceDesc = grpc.ServiceDesc{ ServiceName: "protocol.Tunnel", HandlerType: (*TunnelServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Handshake", Handler: _Tunnel_Handshake_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Mux", Handler: _Tunnel_Mux_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "internal/protocol/protocol.proto", }
Tunnel_ServiceDesc is the grpc.ServiceDesc for Tunnel service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTunnelServer ¶
func RegisterTunnelServer(s grpc.ServiceRegistrar, srv TunnelServer)
Types ¶
type HandshakeRequest ¶
type HandshakeRequest struct { RemoteBind string `protobuf:"bytes,1,opt,name=remoteBind,proto3" json:"remoteBind,omitempty"` // contains filtered or unexported fields }
func (*HandshakeRequest) Descriptor
deprecated
func (*HandshakeRequest) Descriptor() ([]byte, []int)
Deprecated: Use HandshakeRequest.ProtoReflect.Descriptor instead.
func (*HandshakeRequest) GetRemoteBind ¶
func (x *HandshakeRequest) GetRemoteBind() string
func (*HandshakeRequest) ProtoMessage ¶
func (*HandshakeRequest) ProtoMessage()
func (*HandshakeRequest) ProtoReflect ¶
func (x *HandshakeRequest) ProtoReflect() protoreflect.Message
func (*HandshakeRequest) Reset ¶
func (x *HandshakeRequest) Reset()
func (*HandshakeRequest) String ¶
func (x *HandshakeRequest) String() string
type HandshakeResponse ¶
type HandshakeResponse struct { RemoteBind string `protobuf:"bytes,1,opt,name=remoteBind,proto3" json:"remoteBind,omitempty"` TunnelID uint64 `protobuf:"varint,2,opt,name=tunnelID,proto3" json:"tunnelID,omitempty"` // contains filtered or unexported fields }
func (*HandshakeResponse) Descriptor
deprecated
func (*HandshakeResponse) Descriptor() ([]byte, []int)
Deprecated: Use HandshakeResponse.ProtoReflect.Descriptor instead.
func (*HandshakeResponse) GetRemoteBind ¶
func (x *HandshakeResponse) GetRemoteBind() string
func (*HandshakeResponse) GetTunnelID ¶
func (x *HandshakeResponse) GetTunnelID() uint64
func (*HandshakeResponse) ProtoMessage ¶
func (*HandshakeResponse) ProtoMessage()
func (*HandshakeResponse) ProtoReflect ¶
func (x *HandshakeResponse) ProtoReflect() protoreflect.Message
func (*HandshakeResponse) Reset ¶
func (x *HandshakeResponse) Reset()
func (*HandshakeResponse) String ¶
func (x *HandshakeResponse) String() string
type Packet ¶
type Packet struct { TunnelID uint64 `protobuf:"varint,1,opt,name=tunnelID,proto3" json:"tunnelID,omitempty"` ConnID uint64 `protobuf:"varint,2,opt,name=connID,proto3" json:"connID,omitempty"` Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` NewConnection bool `protobuf:"varint,4,opt,name=newConnection,proto3" json:"newConnection,omitempty"` // contains filtered or unexported fields }
func (*Packet) Descriptor
deprecated
func (*Packet) GetNewConnection ¶
func (*Packet) GetPayload ¶
func (*Packet) GetTunnelID ¶
func (*Packet) ProtoMessage ¶
func (*Packet) ProtoMessage()
func (*Packet) ProtoReflect ¶
func (x *Packet) ProtoReflect() protoreflect.Message
type TunnelClient ¶
type TunnelClient interface { Handshake(ctx context.Context, in *HandshakeRequest, opts ...grpc.CallOption) (*HandshakeResponse, error) Mux(ctx context.Context, opts ...grpc.CallOption) (Tunnel_MuxClient, error) }
TunnelClient is the client API for Tunnel 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 NewTunnelClient ¶
func NewTunnelClient(cc grpc.ClientConnInterface) TunnelClient
type TunnelServer ¶
type TunnelServer interface { Handshake(context.Context, *HandshakeRequest) (*HandshakeResponse, error) Mux(Tunnel_MuxServer) error // contains filtered or unexported methods }
TunnelServer is the server API for Tunnel service. All implementations must embed UnimplementedTunnelServer for forward compatibility
type Tunnel_MuxClient ¶
type Tunnel_MuxServer ¶
type UnimplementedTunnelServer ¶
type UnimplementedTunnelServer struct { }
UnimplementedTunnelServer must be embedded to have forward compatible implementations.
func (UnimplementedTunnelServer) Handshake ¶
func (UnimplementedTunnelServer) Handshake(context.Context, *HandshakeRequest) (*HandshakeResponse, error)
func (UnimplementedTunnelServer) Mux ¶
func (UnimplementedTunnelServer) Mux(Tunnel_MuxServer) error
type UnsafeTunnelServer ¶
type UnsafeTunnelServer interface {
// contains filtered or unexported methods
}
UnsafeTunnelServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TunnelServer will result in compilation errors.