Documentation ¶
Index ¶
- Variables
- func RegisterProxyServiceServer(s *grpc.Server, srv ProxyServiceServer)
- type CloseRequest
- func (*CloseRequest) Descriptor() ([]byte, []int)
- func (m *CloseRequest) GetConnectID() int64
- func (*CloseRequest) ProtoMessage()
- func (m *CloseRequest) Reset()
- func (m *CloseRequest) String() string
- func (m *CloseRequest) XXX_DiscardUnknown()
- func (m *CloseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CloseRequest) XXX_Merge(src proto.Message)
- func (m *CloseRequest) XXX_Size() int
- func (m *CloseRequest) XXX_Unmarshal(b []byte) error
- type CloseResponse
- func (*CloseResponse) Descriptor() ([]byte, []int)
- func (m *CloseResponse) GetConnectID() int64
- func (m *CloseResponse) GetError() string
- func (*CloseResponse) ProtoMessage()
- func (m *CloseResponse) Reset()
- func (m *CloseResponse) String() string
- func (m *CloseResponse) XXX_DiscardUnknown()
- func (m *CloseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CloseResponse) XXX_Merge(src proto.Message)
- func (m *CloseResponse) XXX_Size() int
- func (m *CloseResponse) XXX_Unmarshal(b []byte) error
- type Data
- func (*Data) Descriptor() ([]byte, []int)
- func (m *Data) GetConnectID() int64
- func (m *Data) GetData() []byte
- func (m *Data) GetError() string
- func (*Data) ProtoMessage()
- func (m *Data) Reset()
- func (m *Data) String() string
- func (m *Data) XXX_DiscardUnknown()
- func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Data) XXX_Merge(src proto.Message)
- func (m *Data) XXX_Size() int
- func (m *Data) XXX_Unmarshal(b []byte) error
- type DialRequest
- func (*DialRequest) Descriptor() ([]byte, []int)
- func (m *DialRequest) GetAddress() string
- func (m *DialRequest) GetProtocol() string
- func (m *DialRequest) GetRandom() int64
- func (*DialRequest) ProtoMessage()
- func (m *DialRequest) Reset()
- func (m *DialRequest) String() string
- func (m *DialRequest) XXX_DiscardUnknown()
- func (m *DialRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DialRequest) XXX_Merge(src proto.Message)
- func (m *DialRequest) XXX_Size() int
- func (m *DialRequest) XXX_Unmarshal(b []byte) error
- type DialResponse
- func (*DialResponse) Descriptor() ([]byte, []int)
- func (m *DialResponse) GetConnectID() int64
- func (m *DialResponse) GetError() string
- func (m *DialResponse) GetRandom() int64
- func (*DialResponse) ProtoMessage()
- func (m *DialResponse) Reset()
- func (m *DialResponse) String() string
- func (m *DialResponse) XXX_DiscardUnknown()
- func (m *DialResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DialResponse) XXX_Merge(src proto.Message)
- func (m *DialResponse) XXX_Size() int
- func (m *DialResponse) XXX_Unmarshal(b []byte) error
- type Error
- type Packet
- func (*Packet) Descriptor() ([]byte, []int)
- func (m *Packet) GetCloseRequest() *CloseRequest
- func (m *Packet) GetCloseResponse() *CloseResponse
- func (m *Packet) GetData() *Data
- func (m *Packet) GetDialRequest() *DialRequest
- func (m *Packet) GetDialResponse() *DialResponse
- func (m *Packet) GetPayload() isPacket_Payload
- func (m *Packet) GetType() PacketType
- func (*Packet) ProtoMessage()
- func (m *Packet) Reset()
- func (m *Packet) String() string
- func (m *Packet) XXX_DiscardUnknown()
- func (m *Packet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Packet) XXX_Merge(src proto.Message)
- func (*Packet) XXX_OneofWrappers() []interface{}
- func (m *Packet) XXX_Size() int
- func (m *Packet) XXX_Unmarshal(b []byte) error
- type PacketType
- type Packet_CloseRequest
- type Packet_CloseResponse
- type Packet_Data
- type Packet_DialRequest
- type Packet_DialResponse
- type ProxyServiceClient
- type ProxyServiceServer
- type ProxyService_ProxyClient
- type ProxyService_ProxyServer
- type UnimplementedProxyServiceServer
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterProxyServiceServer ¶
func RegisterProxyServiceServer(s *grpc.Server, srv ProxyServiceServer)
Types ¶
type CloseRequest ¶
type CloseRequest struct { // connectID of the stream to close ConnectID int64 `protobuf:"varint,1,opt,name=connectID,proto3" json:"connectID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CloseRequest) Descriptor ¶
func (*CloseRequest) Descriptor() ([]byte, []int)
func (*CloseRequest) GetConnectID ¶
func (m *CloseRequest) GetConnectID() int64
func (*CloseRequest) ProtoMessage ¶
func (*CloseRequest) ProtoMessage()
func (*CloseRequest) Reset ¶
func (m *CloseRequest) Reset()
func (*CloseRequest) String ¶
func (m *CloseRequest) String() string
func (*CloseRequest) XXX_DiscardUnknown ¶
func (m *CloseRequest) XXX_DiscardUnknown()
func (*CloseRequest) XXX_Marshal ¶
func (m *CloseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CloseRequest) XXX_Merge ¶
func (m *CloseRequest) XXX_Merge(src proto.Message)
func (*CloseRequest) XXX_Size ¶
func (m *CloseRequest) XXX_Size() int
func (*CloseRequest) XXX_Unmarshal ¶
func (m *CloseRequest) XXX_Unmarshal(b []byte) error
type CloseResponse ¶
type CloseResponse struct { // error message Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` // connectID indicates the identifier of the connection ConnectID int64 `protobuf:"varint,2,opt,name=connectID,proto3" json:"connectID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CloseResponse) Descriptor ¶
func (*CloseResponse) Descriptor() ([]byte, []int)
func (*CloseResponse) GetConnectID ¶
func (m *CloseResponse) GetConnectID() int64
func (*CloseResponse) GetError ¶
func (m *CloseResponse) GetError() string
func (*CloseResponse) ProtoMessage ¶
func (*CloseResponse) ProtoMessage()
func (*CloseResponse) Reset ¶
func (m *CloseResponse) Reset()
func (*CloseResponse) String ¶
func (m *CloseResponse) String() string
func (*CloseResponse) XXX_DiscardUnknown ¶
func (m *CloseResponse) XXX_DiscardUnknown()
func (*CloseResponse) XXX_Marshal ¶
func (m *CloseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CloseResponse) XXX_Merge ¶
func (m *CloseResponse) XXX_Merge(src proto.Message)
func (*CloseResponse) XXX_Size ¶
func (m *CloseResponse) XXX_Size() int
func (*CloseResponse) XXX_Unmarshal ¶
func (m *CloseResponse) XXX_Unmarshal(b []byte) error
type Data ¶
type Data struct { // connectID to connect to ConnectID int64 `protobuf:"varint,1,opt,name=connectID,proto3" json:"connectID,omitempty"` // error message if error happens Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // stream data Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
type DialRequest ¶
type DialRequest struct { // tcp or udp? Protocol string `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"` // node:port Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // random id for client, maybe should be longer Random int64 `protobuf:"varint,3,opt,name=random,proto3" json:"random,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DialRequest) Descriptor ¶
func (*DialRequest) Descriptor() ([]byte, []int)
func (*DialRequest) GetAddress ¶
func (m *DialRequest) GetAddress() string
func (*DialRequest) GetProtocol ¶
func (m *DialRequest) GetProtocol() string
func (*DialRequest) GetRandom ¶
func (m *DialRequest) GetRandom() int64
func (*DialRequest) ProtoMessage ¶
func (*DialRequest) ProtoMessage()
func (*DialRequest) Reset ¶
func (m *DialRequest) Reset()
func (*DialRequest) String ¶
func (m *DialRequest) String() string
func (*DialRequest) XXX_DiscardUnknown ¶
func (m *DialRequest) XXX_DiscardUnknown()
func (*DialRequest) XXX_Marshal ¶
func (m *DialRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DialRequest) XXX_Merge ¶
func (m *DialRequest) XXX_Merge(src proto.Message)
func (*DialRequest) XXX_Size ¶
func (m *DialRequest) XXX_Size() int
func (*DialRequest) XXX_Unmarshal ¶
func (m *DialRequest) XXX_Unmarshal(b []byte) error
type DialResponse ¶
type DialResponse struct { // error failed reason; enum? Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` // connectID indicates the identifier of the connection ConnectID int64 `protobuf:"varint,2,opt,name=connectID,proto3" json:"connectID,omitempty"` // random copied from DialRequest Random int64 `protobuf:"varint,3,opt,name=random,proto3" json:"random,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DialResponse) Descriptor ¶
func (*DialResponse) Descriptor() ([]byte, []int)
func (*DialResponse) GetConnectID ¶
func (m *DialResponse) GetConnectID() int64
func (*DialResponse) GetError ¶
func (m *DialResponse) GetError() string
func (*DialResponse) GetRandom ¶
func (m *DialResponse) GetRandom() int64
func (*DialResponse) ProtoMessage ¶
func (*DialResponse) ProtoMessage()
func (*DialResponse) Reset ¶
func (m *DialResponse) Reset()
func (*DialResponse) String ¶
func (m *DialResponse) String() string
func (*DialResponse) XXX_DiscardUnknown ¶
func (m *DialResponse) XXX_DiscardUnknown()
func (*DialResponse) XXX_Marshal ¶
func (m *DialResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DialResponse) XXX_Merge ¶
func (m *DialResponse) XXX_Merge(src proto.Message)
func (*DialResponse) XXX_Size ¶
func (m *DialResponse) XXX_Size() int
func (*DialResponse) XXX_Unmarshal ¶
func (m *DialResponse) XXX_Unmarshal(b []byte) error
type Packet ¶
type Packet struct { Type PacketType `protobuf:"varint,1,opt,name=type,proto3,enum=PacketType" json:"type,omitempty"` // Types that are valid to be assigned to Payload: // *Packet_DialRequest // *Packet_DialResponse // *Packet_Data // *Packet_CloseRequest // *Packet_CloseResponse Payload isPacket_Payload `protobuf_oneof:"payload"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Packet) GetCloseRequest ¶
func (m *Packet) GetCloseRequest() *CloseRequest
func (*Packet) GetCloseResponse ¶
func (m *Packet) GetCloseResponse() *CloseResponse
func (*Packet) GetDialRequest ¶
func (m *Packet) GetDialRequest() *DialRequest
func (*Packet) GetDialResponse ¶
func (m *Packet) GetDialResponse() *DialResponse
func (*Packet) GetType ¶
func (m *Packet) GetType() PacketType
func (*Packet) XXX_Marshal ¶
type PacketType ¶
type PacketType int32
const ( PacketType_DIAL_REQ PacketType = 0 PacketType_DIAL_RSP PacketType = 1 PacketType_CLOSE_REQ PacketType = 2 PacketType_CLOSE_RSP PacketType = 3 PacketType_DATA PacketType = 4 )
func (PacketType) EnumDescriptor ¶
func (PacketType) EnumDescriptor() ([]byte, []int)
func (PacketType) String ¶
func (x PacketType) String() string
type Packet_CloseRequest ¶
type Packet_CloseRequest struct {
CloseRequest *CloseRequest `protobuf:"bytes,5,opt,name=closeRequest,proto3,oneof"`
}
type Packet_CloseResponse ¶
type Packet_CloseResponse struct {
CloseResponse *CloseResponse `protobuf:"bytes,6,opt,name=closeResponse,proto3,oneof"`
}
type Packet_Data ¶
type Packet_Data struct {
Data *Data `protobuf:"bytes,4,opt,name=data,proto3,oneof"`
}
type Packet_DialRequest ¶
type Packet_DialRequest struct {
DialRequest *DialRequest `protobuf:"bytes,2,opt,name=dialRequest,proto3,oneof"`
}
type Packet_DialResponse ¶
type Packet_DialResponse struct {
DialResponse *DialResponse `protobuf:"bytes,3,opt,name=dialResponse,proto3,oneof"`
}
type ProxyServiceClient ¶
type ProxyServiceClient interface {
Proxy(ctx context.Context, opts ...grpc.CallOption) (ProxyService_ProxyClient, error)
}
ProxyServiceClient is the client API for ProxyService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewProxyServiceClient ¶
func NewProxyServiceClient(cc *grpc.ClientConn) ProxyServiceClient
type ProxyServiceServer ¶
type ProxyServiceServer interface {
Proxy(ProxyService_ProxyServer) error
}
ProxyServiceServer is the server API for ProxyService service.
type ProxyService_ProxyClient ¶
type ProxyService_ProxyServer ¶
type UnimplementedProxyServiceServer ¶
type UnimplementedProxyServiceServer struct { }
UnimplementedProxyServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedProxyServiceServer) Proxy ¶
func (*UnimplementedProxyServiceServer) Proxy(srv ProxyService_ProxyServer) error
Click to show internal directories.
Click to hide internal directories.