Documentation
¶
Overview ¶
Package proto is a generated protocol buffer package.
It is generated from these files:
hub.proto
It has these top-level messages:
Packet
Index ¶
- Variables
- func RegisterHubServer(s *grpc.Server, srv HubServer)
- type HubClient
- type HubServer
- type Hub_GatewayClient
- type Hub_GatewayServer
- type Hub_ProxyClient
- type Hub_ProxyServer
- type Packet
- func (*Packet) Descriptor() ([]byte, []int)
- func (m *Packet) GetBody() []byte
- func (m *Packet) GetConnID() int64
- func (m *Packet) GetState() Packet_State
- func (m *Packet) GetTargetAddress() string
- func (m *Packet) Marshal() (dAtA []byte, err error)
- func (m *Packet) MarshalTo(dAtA []byte) (int, error)
- func (*Packet) ProtoMessage()
- func (m *Packet) Reset()
- func (m *Packet) Size() (n int)
- func (m *Packet) String() string
- func (m *Packet) Unmarshal(dAtA []byte) error
- type Packet_State
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthHub = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowHub = fmt.Errorf("proto: integer overflow") )
View Source
var Packet_State_name = map[int32]string{
0: "Flowing",
1: "Handshake",
2: "Closed",
}
View Source
var Packet_State_value = map[string]int32{
"Flowing": 0,
"Handshake": 1,
"Closed": 2,
}
Functions ¶
func RegisterHubServer ¶
Types ¶
type HubClient ¶
type HubClient interface { Gateway(ctx context.Context, opts ...grpc.CallOption) (Hub_GatewayClient, error) Proxy(ctx context.Context, opts ...grpc.CallOption) (Hub_ProxyClient, error) }
func NewHubClient ¶
func NewHubClient(cc *grpc.ClientConn) HubClient
type HubServer ¶
type HubServer interface { Gateway(Hub_GatewayServer) error Proxy(Hub_ProxyServer) error }
type Hub_GatewayClient ¶
type Hub_GatewayServer ¶
type Hub_ProxyClient ¶
type Hub_ProxyServer ¶
type Packet ¶
type Packet struct { ConnID int64 `protobuf:"varint,1,opt,name=connID,proto3" json:"connID,omitempty"` TargetAddress string `protobuf:"bytes,2,opt,name=targetAddress,proto3" json:"targetAddress,omitempty"` State Packet_State `protobuf:"varint,3,opt,name=state,proto3,enum=proto.Packet_State" json:"state,omitempty"` Body []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` }
func (*Packet) Descriptor ¶
func (*Packet) GetState ¶
func (m *Packet) GetState() Packet_State
func (*Packet) GetTargetAddress ¶
func (*Packet) ProtoMessage ¶
func (*Packet) ProtoMessage()
type Packet_State ¶
type Packet_State int32
const ( Packet_Flowing Packet_State = 0 Packet_Handshake Packet_State = 1 Packet_Closed Packet_State = 2 )
func (Packet_State) EnumDescriptor ¶
func (Packet_State) EnumDescriptor() ([]byte, []int)
func (Packet_State) String ¶
func (x Packet_State) String() string
Click to show internal directories.
Click to hide internal directories.