Documentation ¶
Index ¶
- Variables
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type ServiceClient
- type ServiceServer
- type Service_TunnelClient
- type Service_TunnelServer
- type TunnelClose
- func (*TunnelClose) Descriptor() ([]byte, []int)deprecated
- func (x *TunnelClose) GetCode() uint32
- func (x *TunnelClose) GetMessage() string
- func (x *TunnelClose) GetTunnelId() uint64
- func (*TunnelClose) ProtoMessage()
- func (x *TunnelClose) ProtoReflect() protoreflect.Message
- func (x *TunnelClose) Reset()
- func (x *TunnelClose) String() string
- type TunnelData
- type TunnelInfo
- type TunnelMessage
- func (*TunnelMessage) Descriptor() ([]byte, []int)deprecated
- func (x *TunnelMessage) GetClose() *TunnelClose
- func (x *TunnelMessage) GetData() *TunnelData
- func (m *TunnelMessage) GetMessage() isTunnelMessage_Message
- func (x *TunnelMessage) GetNewTunnel() *TunnelInfo
- func (*TunnelMessage) ProtoMessage()
- func (x *TunnelMessage) ProtoReflect() protoreflect.Message
- func (x *TunnelMessage) Reset()
- func (x *TunnelMessage) String() string
- type TunnelMessage_Close
- type TunnelMessage_Data
- type TunnelMessage_NewTunnel
- type TunnelRequest
- type TunnelResponse
- type UnimplementedServiceServer
- type UnsafeServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_api_v1_tunnel_service_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.v1.tunnel.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Tunnel", Handler: _Service_Tunnel_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "api/v1/tunnel/service.proto", }
Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type ServiceClient ¶
type ServiceClient interface {
Tunnel(ctx context.Context, opts ...grpc.CallOption) (Service_TunnelClient, error)
}
ServiceClient is the client API for Service 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 NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶
type ServiceServer interface { Tunnel(Service_TunnelServer) error // contains filtered or unexported methods }
ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility
type Service_TunnelClient ¶
type Service_TunnelClient interface { Send(*TunnelRequest) error Recv() (*TunnelResponse, error) grpc.ClientStream }
type Service_TunnelServer ¶
type Service_TunnelServer interface { Send(*TunnelResponse) error Recv() (*TunnelRequest, error) grpc.ServerStream }
type TunnelClose ¶
type TunnelClose struct { TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` Code uint32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*TunnelClose) Descriptor
deprecated
func (*TunnelClose) Descriptor() ([]byte, []int)
Deprecated: Use TunnelClose.ProtoReflect.Descriptor instead.
func (*TunnelClose) GetCode ¶
func (x *TunnelClose) GetCode() uint32
func (*TunnelClose) GetMessage ¶
func (x *TunnelClose) GetMessage() string
func (*TunnelClose) GetTunnelId ¶
func (x *TunnelClose) GetTunnelId() uint64
func (*TunnelClose) ProtoMessage ¶
func (*TunnelClose) ProtoMessage()
func (*TunnelClose) ProtoReflect ¶
func (x *TunnelClose) ProtoReflect() protoreflect.Message
func (*TunnelClose) Reset ¶
func (x *TunnelClose) Reset()
func (*TunnelClose) String ¶
func (x *TunnelClose) String() string
type TunnelData ¶
type TunnelData struct { TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*TunnelData) Descriptor
deprecated
func (*TunnelData) Descriptor() ([]byte, []int)
Deprecated: Use TunnelData.ProtoReflect.Descriptor instead.
func (*TunnelData) GetData ¶
func (x *TunnelData) GetData() []byte
func (*TunnelData) GetTunnelId ¶
func (x *TunnelData) GetTunnelId() uint64
func (*TunnelData) ProtoMessage ¶
func (*TunnelData) ProtoMessage()
func (*TunnelData) ProtoReflect ¶
func (x *TunnelData) ProtoReflect() protoreflect.Message
func (*TunnelData) Reset ¶
func (x *TunnelData) Reset()
func (*TunnelData) String ¶
func (x *TunnelData) String() string
type TunnelInfo ¶
type TunnelInfo struct { TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` // contains filtered or unexported fields }
func (*TunnelInfo) Descriptor
deprecated
func (*TunnelInfo) Descriptor() ([]byte, []int)
Deprecated: Use TunnelInfo.ProtoReflect.Descriptor instead.
func (*TunnelInfo) GetPort ¶
func (x *TunnelInfo) GetPort() uint32
func (*TunnelInfo) GetTunnelId ¶
func (x *TunnelInfo) GetTunnelId() uint64
func (*TunnelInfo) ProtoMessage ¶
func (*TunnelInfo) ProtoMessage()
func (*TunnelInfo) ProtoReflect ¶
func (x *TunnelInfo) ProtoReflect() protoreflect.Message
func (*TunnelInfo) Reset ¶
func (x *TunnelInfo) Reset()
func (*TunnelInfo) String ¶
func (x *TunnelInfo) String() string
type TunnelMessage ¶
type TunnelMessage struct { // Types that are assignable to Message: // // *TunnelMessage_NewTunnel // *TunnelMessage_Data // *TunnelMessage_Close Message isTunnelMessage_Message `protobuf_oneof:"message"` // contains filtered or unexported fields }
func (*TunnelMessage) Descriptor
deprecated
func (*TunnelMessage) Descriptor() ([]byte, []int)
Deprecated: Use TunnelMessage.ProtoReflect.Descriptor instead.
func (*TunnelMessage) GetClose ¶
func (x *TunnelMessage) GetClose() *TunnelClose
func (*TunnelMessage) GetData ¶
func (x *TunnelMessage) GetData() *TunnelData
func (*TunnelMessage) GetMessage ¶
func (m *TunnelMessage) GetMessage() isTunnelMessage_Message
func (*TunnelMessage) GetNewTunnel ¶
func (x *TunnelMessage) GetNewTunnel() *TunnelInfo
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 TunnelMessage_Close ¶
type TunnelMessage_Close struct {
Close *TunnelClose `protobuf:"bytes,3,opt,name=close,proto3,oneof"`
}
type TunnelMessage_Data ¶
type TunnelMessage_Data struct {
Data *TunnelData `protobuf:"bytes,2,opt,name=data,proto3,oneof"`
}
type TunnelMessage_NewTunnel ¶
type TunnelMessage_NewTunnel struct {
NewTunnel *TunnelInfo `protobuf:"bytes,1,opt,name=new_tunnel,json=newTunnel,proto3,oneof"`
}
type TunnelRequest ¶
type TunnelRequest struct { Message *TunnelMessage `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*TunnelRequest) Descriptor
deprecated
func (*TunnelRequest) Descriptor() ([]byte, []int)
Deprecated: Use TunnelRequest.ProtoReflect.Descriptor instead.
func (*TunnelRequest) GetMessage ¶
func (x *TunnelRequest) GetMessage() *TunnelMessage
func (*TunnelRequest) ProtoMessage ¶
func (*TunnelRequest) ProtoMessage()
func (*TunnelRequest) ProtoReflect ¶
func (x *TunnelRequest) ProtoReflect() protoreflect.Message
func (*TunnelRequest) Reset ¶
func (x *TunnelRequest) Reset()
func (*TunnelRequest) String ¶
func (x *TunnelRequest) String() string
type TunnelResponse ¶
type TunnelResponse struct { Message *TunnelMessage `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*TunnelResponse) Descriptor
deprecated
func (*TunnelResponse) Descriptor() ([]byte, []int)
Deprecated: Use TunnelResponse.ProtoReflect.Descriptor instead.
func (*TunnelResponse) GetMessage ¶
func (x *TunnelResponse) GetMessage() *TunnelMessage
func (*TunnelResponse) ProtoMessage ¶
func (*TunnelResponse) ProtoMessage()
func (*TunnelResponse) ProtoReflect ¶
func (x *TunnelResponse) ProtoReflect() protoreflect.Message
func (*TunnelResponse) Reset ¶
func (x *TunnelResponse) Reset()
func (*TunnelResponse) String ¶
func (x *TunnelResponse) String() string
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedServiceServer) Tunnel ¶
func (UnimplementedServiceServer) Tunnel(Service_TunnelServer) error
type UnsafeServiceServer ¶
type UnsafeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.