Documentation ¶
Index ¶
- Variables
- func RegisterClientServer(s *grpc.Server, srv ClientServer)
- func RegisterPeerCliServer(s *grpc.Server, srv PeerCliServer)
- func RegisterPeerSvcServer(s *grpc.Server, srv PeerSvcServer)
- func RegisterServiceServer(s *grpc.Server, srv ServiceServer)
- type AuthReq
- func (*AuthReq) Descriptor() ([]byte, []int)
- func (m *AuthReq) GetName() string
- func (m *AuthReq) Marshal() (dAtA []byte, err error)
- func (m *AuthReq) MarshalTo(dAtA []byte) (int, error)
- func (m *AuthReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AuthReq) ProtoMessage()
- func (m *AuthReq) Reset()
- func (m *AuthReq) Size() (n int)
- func (m *AuthReq) String() string
- func (m *AuthReq) Unmarshal(dAtA []byte) error
- func (m *AuthReq) XXX_DiscardUnknown()
- func (m *AuthReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AuthReq) XXX_Merge(src proto.Message)
- func (m *AuthReq) XXX_Size() int
- func (m *AuthReq) XXX_Unmarshal(b []byte) error
- type AuthRsp
- func (*AuthRsp) Descriptor() ([]byte, []int)
- func (m *AuthRsp) GetErr() *Err
- func (m *AuthRsp) GetStatus() AuthRsp_STATUS
- func (m *AuthRsp) Marshal() (dAtA []byte, err error)
- func (m *AuthRsp) MarshalTo(dAtA []byte) (int, error)
- func (m *AuthRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AuthRsp) ProtoMessage()
- func (m *AuthRsp) Reset()
- func (m *AuthRsp) Size() (n int)
- func (m *AuthRsp) String() string
- func (m *AuthRsp) Unmarshal(dAtA []byte) error
- func (m *AuthRsp) XXX_DiscardUnknown()
- func (m *AuthRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AuthRsp) XXX_Merge(src proto.Message)
- func (m *AuthRsp) XXX_Size() int
- func (m *AuthRsp) XXX_Unmarshal(b []byte) error
- type AuthRsp_STATUS
- type ClientClient
- type ClientInfo
- func (*ClientInfo) Descriptor() ([]byte, []int)
- func (m *ClientInfo) GetAddr() string
- func (m *ClientInfo) GetName() string
- func (m *ClientInfo) GetNetwork() Network
- func (m *ClientInfo) Marshal() (dAtA []byte, err error)
- func (m *ClientInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *ClientInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ClientInfo) ProtoMessage()
- func (m *ClientInfo) Reset()
- func (m *ClientInfo) Size() (n int)
- func (m *ClientInfo) String() string
- func (m *ClientInfo) Unmarshal(dAtA []byte) error
- func (m *ClientInfo) XXX_DiscardUnknown()
- func (m *ClientInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClientInfo) XXX_Merge(src proto.Message)
- func (m *ClientInfo) XXX_Size() int
- func (m *ClientInfo) XXX_Unmarshal(b []byte) error
- type ClientServer
- type ClientsReq
- func (*ClientsReq) Descriptor() ([]byte, []int)
- func (m *ClientsReq) GetMyName() string
- func (m *ClientsReq) GetNames() []string
- func (m *ClientsReq) Marshal() (dAtA []byte, err error)
- func (m *ClientsReq) MarshalTo(dAtA []byte) (int, error)
- func (m *ClientsReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ClientsReq) ProtoMessage()
- func (m *ClientsReq) Reset()
- func (m *ClientsReq) Size() (n int)
- func (m *ClientsReq) String() string
- func (m *ClientsReq) Unmarshal(dAtA []byte) error
- func (m *ClientsReq) XXX_DiscardUnknown()
- func (m *ClientsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClientsReq) XXX_Merge(src proto.Message)
- func (m *ClientsReq) XXX_Size() int
- func (m *ClientsReq) XXX_Unmarshal(b []byte) error
- type ClientsRsp
- func (*ClientsRsp) Descriptor() ([]byte, []int)
- func (m *ClientsRsp) GetClients() []*ClientInfo
- func (m *ClientsRsp) Marshal() (dAtA []byte, err error)
- func (m *ClientsRsp) MarshalTo(dAtA []byte) (int, error)
- func (m *ClientsRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ClientsRsp) ProtoMessage()
- func (m *ClientsRsp) Reset()
- func (m *ClientsRsp) Size() (n int)
- func (m *ClientsRsp) String() string
- func (m *ClientsRsp) Unmarshal(dAtA []byte) error
- func (m *ClientsRsp) XXX_DiscardUnknown()
- func (m *ClientsRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClientsRsp) XXX_Merge(src proto.Message)
- func (m *ClientsRsp) XXX_Size() int
- func (m *ClientsRsp) XXX_Unmarshal(b []byte) error
- type CloseReq
- func (*CloseReq) Descriptor() ([]byte, []int)
- func (m *CloseReq) Marshal() (dAtA []byte, err error)
- func (m *CloseReq) MarshalTo(dAtA []byte) (int, error)
- func (m *CloseReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CloseReq) ProtoMessage()
- func (m *CloseReq) Reset()
- func (m *CloseReq) Size() (n int)
- func (m *CloseReq) String() string
- func (m *CloseReq) Unmarshal(dAtA []byte) error
- func (m *CloseReq) XXX_DiscardUnknown()
- func (m *CloseReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CloseReq) XXX_Merge(src proto.Message)
- func (m *CloseReq) XXX_Size() int
- func (m *CloseReq) XXX_Unmarshal(b []byte) error
- type CloseRsp
- func (*CloseRsp) Descriptor() ([]byte, []int)
- func (m *CloseRsp) GetErr() *Err
- func (m *CloseRsp) Marshal() (dAtA []byte, err error)
- func (m *CloseRsp) MarshalTo(dAtA []byte) (int, error)
- func (m *CloseRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CloseRsp) ProtoMessage()
- func (m *CloseRsp) Reset()
- func (m *CloseRsp) Size() (n int)
- func (m *CloseRsp) String() string
- func (m *CloseRsp) Unmarshal(dAtA []byte) error
- func (m *CloseRsp) XXX_DiscardUnknown()
- func (m *CloseRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CloseRsp) XXX_Merge(src proto.Message)
- func (m *CloseRsp) XXX_Size() int
- func (m *CloseRsp) XXX_Unmarshal(b []byte) error
- type ConnPeerReq
- func (*ConnPeerReq) Descriptor() ([]byte, []int)
- func (m *ConnPeerReq) GetClient() *ClientInfo
- func (m *ConnPeerReq) GetFrequency() int32
- func (m *ConnPeerReq) GetTimestamp() int64
- func (m *ConnPeerReq) Marshal() (dAtA []byte, err error)
- func (m *ConnPeerReq) MarshalTo(dAtA []byte) (int, error)
- func (m *ConnPeerReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ConnPeerReq) ProtoMessage()
- func (m *ConnPeerReq) Reset()
- func (m *ConnPeerReq) Size() (n int)
- func (m *ConnPeerReq) String() string
- func (m *ConnPeerReq) Unmarshal(dAtA []byte) error
- func (m *ConnPeerReq) XXX_DiscardUnknown()
- func (m *ConnPeerReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConnPeerReq) XXX_Merge(src proto.Message)
- func (m *ConnPeerReq) XXX_Size() int
- func (m *ConnPeerReq) XXX_Unmarshal(b []byte) error
- type ConnPeerRsp
- func (*ConnPeerRsp) Descriptor() ([]byte, []int)
- func (m *ConnPeerRsp) GetClient() *ClientInfo
- func (m *ConnPeerRsp) GetErr() *Err
- func (m *ConnPeerRsp) GetStatus() ConnPeerRsp_STATUS
- func (m *ConnPeerRsp) GetTimestamp() int64
- func (m *ConnPeerRsp) Marshal() (dAtA []byte, err error)
- func (m *ConnPeerRsp) MarshalTo(dAtA []byte) (int, error)
- func (m *ConnPeerRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ConnPeerRsp) ProtoMessage()
- func (m *ConnPeerRsp) Reset()
- func (m *ConnPeerRsp) Size() (n int)
- func (m *ConnPeerRsp) String() string
- func (m *ConnPeerRsp) Unmarshal(dAtA []byte) error
- func (m *ConnPeerRsp) XXX_DiscardUnknown()
- func (m *ConnPeerRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConnPeerRsp) XXX_Merge(src proto.Message)
- func (m *ConnPeerRsp) XXX_Size() int
- func (m *ConnPeerRsp) XXX_Unmarshal(b []byte) error
- type ConnPeerRsp_STATUS
- type Err
- func (*Err) Descriptor() ([]byte, []int)
- func (m *Err) GetCode() int64
- func (m *Err) GetMsg() string
- func (m *Err) Marshal() (dAtA []byte, err error)
- func (m *Err) MarshalTo(dAtA []byte) (int, error)
- func (m *Err) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Err) ProtoMessage()
- func (m *Err) Reset()
- func (m *Err) Size() (n int)
- func (m *Err) String() string
- func (m *Err) Unmarshal(dAtA []byte) error
- func (m *Err) XXX_DiscardUnknown()
- func (m *Err) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Err) XXX_Merge(src proto.Message)
- func (m *Err) XXX_Size() int
- func (m *Err) XXX_Unmarshal(b []byte) error
- type LatencyReq
- func (*LatencyReq) Descriptor() ([]byte, []int)
- func (m *LatencyReq) GetTs() int64
- func (m *LatencyReq) Marshal() (dAtA []byte, err error)
- func (m *LatencyReq) MarshalTo(dAtA []byte) (int, error)
- func (m *LatencyReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LatencyReq) ProtoMessage()
- func (m *LatencyReq) Reset()
- func (m *LatencyReq) Size() (n int)
- func (m *LatencyReq) String() string
- func (m *LatencyReq) Unmarshal(dAtA []byte) error
- func (m *LatencyReq) XXX_DiscardUnknown()
- func (m *LatencyReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LatencyReq) XXX_Merge(src proto.Message)
- func (m *LatencyReq) XXX_Size() int
- func (m *LatencyReq) XXX_Unmarshal(b []byte) error
- type LatencyRsp
- func (*LatencyRsp) Descriptor() ([]byte, []int)
- func (m *LatencyRsp) GetTs() int64
- func (m *LatencyRsp) Marshal() (dAtA []byte, err error)
- func (m *LatencyRsp) MarshalTo(dAtA []byte) (int, error)
- func (m *LatencyRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LatencyRsp) ProtoMessage()
- func (m *LatencyRsp) Reset()
- func (m *LatencyRsp) Size() (n int)
- func (m *LatencyRsp) String() string
- func (m *LatencyRsp) Unmarshal(dAtA []byte) error
- func (m *LatencyRsp) XXX_DiscardUnknown()
- func (m *LatencyRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LatencyRsp) XXX_Merge(src proto.Message)
- func (m *LatencyRsp) XXX_Size() int
- func (m *LatencyRsp) XXX_Unmarshal(b []byte) error
- type Network
- type PeerCliClient
- type PeerCliServer
- type PeerSvcClient
- type PeerSvcServer
- type ServiceClient
- type ServiceServer
- type StreamReq
- func (*StreamReq) Descriptor() ([]byte, []int)
- func (m *StreamReq) GetAddr() string
- func (m *StreamReq) GetBody() []byte
- func (m *StreamReq) GetNetwork() Network
- func (m *StreamReq) Marshal() (dAtA []byte, err error)
- func (m *StreamReq) MarshalTo(dAtA []byte) (int, error)
- func (m *StreamReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StreamReq) ProtoMessage()
- func (m *StreamReq) Reset()
- func (m *StreamReq) Size() (n int)
- func (m *StreamReq) String() string
- func (m *StreamReq) Unmarshal(dAtA []byte) error
- func (m *StreamReq) XXX_DiscardUnknown()
- func (m *StreamReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StreamReq) XXX_Merge(src proto.Message)
- func (m *StreamReq) XXX_Size() int
- func (m *StreamReq) XXX_Unmarshal(b []byte) error
- type StreamRsp
- func (*StreamRsp) Descriptor() ([]byte, []int)
- func (m *StreamRsp) GetBody() []byte
- func (m *StreamRsp) GetErr() *Err
- func (m *StreamRsp) Marshal() (dAtA []byte, err error)
- func (m *StreamRsp) MarshalTo(dAtA []byte) (int, error)
- func (m *StreamRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StreamRsp) ProtoMessage()
- func (m *StreamRsp) Reset()
- func (m *StreamRsp) Size() (n int)
- func (m *StreamRsp) String() string
- func (m *StreamRsp) Unmarshal(dAtA []byte) error
- func (m *StreamRsp) XXX_DiscardUnknown()
- func (m *StreamRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StreamRsp) XXX_Merge(src proto.Message)
- func (m *StreamRsp) XXX_Size() int
- func (m *StreamRsp) XXX_Unmarshal(b []byte) error
- type UnimplementedClientServer
- type UnimplementedPeerCliServer
- type UnimplementedPeerSvcServer
- type UnimplementedServiceServer
- func (*UnimplementedServiceServer) Auth(ctx context.Context, req *AuthReq) (*AuthRsp, error)
- func (*UnimplementedServiceServer) Clients(ctx context.Context, req *ClientsReq) (*ClientsRsp, error)
- func (*UnimplementedServiceServer) Close(ctx context.Context, req *CloseReq) (*CloseRsp, error)
- func (*UnimplementedServiceServer) ConnPeer(ctx context.Context, req *ConnPeerReq) (*ConnPeerRsp, error)
- func (*UnimplementedServiceServer) Latency(ctx context.Context, req *LatencyReq) (*LatencyRsp, error)
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthService = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowService = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group") )
var AuthRsp_STATUS_name = map[int32]string{
0: "Succ",
1: "Fail",
}
var AuthRsp_STATUS_value = map[string]int32{
"Succ": 0,
"Fail": 1,
}
var ConnPeerRsp_STATUS_name = map[int32]string{
0: "Succ",
1: "Fail",
}
var ConnPeerRsp_STATUS_value = map[string]int32{
"Succ": 0,
"Fail": 1,
}
var Network_name = map[int32]string{
0: "TCP",
1: "UDP",
}
var Network_value = map[string]int32{
"TCP": 0,
"UDP": 1,
}
Functions ¶
func RegisterClientServer ¶
func RegisterClientServer(s *grpc.Server, srv ClientServer)
func RegisterPeerCliServer ¶
func RegisterPeerCliServer(s *grpc.Server, srv PeerCliServer)
func RegisterPeerSvcServer ¶
func RegisterPeerSvcServer(s *grpc.Server, srv PeerSvcServer)
func RegisterServiceServer ¶
func RegisterServiceServer(s *grpc.Server, srv ServiceServer)
Types ¶
type AuthReq ¶
type AuthReq struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*AuthReq) Descriptor ¶
func (*AuthReq) MarshalToSizedBuffer ¶
func (*AuthReq) ProtoMessage ¶
func (*AuthReq) ProtoMessage()
func (*AuthReq) XXX_DiscardUnknown ¶
func (m *AuthReq) XXX_DiscardUnknown()
func (*AuthReq) XXX_Marshal ¶
func (*AuthReq) XXX_Unmarshal ¶
type AuthRsp ¶
type AuthRsp struct { Status AuthRsp_STATUS `protobuf:"varint,1,opt,name=status,proto3,enum=pb.AuthRsp_STATUS" json:"status,omitempty"` Err *Err `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*AuthRsp) Descriptor ¶
func (*AuthRsp) GetStatus ¶
func (m *AuthRsp) GetStatus() AuthRsp_STATUS
func (*AuthRsp) MarshalToSizedBuffer ¶
func (*AuthRsp) ProtoMessage ¶
func (*AuthRsp) ProtoMessage()
func (*AuthRsp) XXX_DiscardUnknown ¶
func (m *AuthRsp) XXX_DiscardUnknown()
func (*AuthRsp) XXX_Marshal ¶
func (*AuthRsp) XXX_Unmarshal ¶
type AuthRsp_STATUS ¶
type AuthRsp_STATUS int32
const ( AuthRsp_Succ AuthRsp_STATUS = 0 AuthRsp_Fail AuthRsp_STATUS = 1 )
func (AuthRsp_STATUS) EnumDescriptor ¶
func (AuthRsp_STATUS) EnumDescriptor() ([]byte, []int)
func (AuthRsp_STATUS) String ¶
func (x AuthRsp_STATUS) String() string
type ClientClient ¶
type ClientClient interface { Close(ctx context.Context, in *CloseReq, opts ...grpc.CallOption) (*CloseRsp, error) Latency(ctx context.Context, in *LatencyReq, opts ...grpc.CallOption) (*LatencyRsp, error) ConnPeer(ctx context.Context, in *ConnPeerReq, opts ...grpc.CallOption) (*ConnPeerRsp, error) }
ClientClient is the client API for Client service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewClientClient ¶
func NewClientClient(cc *grpc.ClientConn) ClientClient
type ClientInfo ¶
type ClientInfo struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` Network Network `protobuf:"varint,3,opt,name=network,proto3,enum=pb.Network" json:"network,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ClientInfo) Descriptor ¶
func (*ClientInfo) Descriptor() ([]byte, []int)
func (*ClientInfo) GetAddr ¶
func (m *ClientInfo) GetAddr() string
func (*ClientInfo) GetName ¶
func (m *ClientInfo) GetName() string
func (*ClientInfo) GetNetwork ¶
func (m *ClientInfo) GetNetwork() Network
func (*ClientInfo) Marshal ¶
func (m *ClientInfo) Marshal() (dAtA []byte, err error)
func (*ClientInfo) MarshalToSizedBuffer ¶
func (m *ClientInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ClientInfo) ProtoMessage ¶
func (*ClientInfo) ProtoMessage()
func (*ClientInfo) Reset ¶
func (m *ClientInfo) Reset()
func (*ClientInfo) Size ¶
func (m *ClientInfo) Size() (n int)
func (*ClientInfo) String ¶
func (m *ClientInfo) String() string
func (*ClientInfo) Unmarshal ¶
func (m *ClientInfo) Unmarshal(dAtA []byte) error
func (*ClientInfo) XXX_DiscardUnknown ¶
func (m *ClientInfo) XXX_DiscardUnknown()
func (*ClientInfo) XXX_Marshal ¶
func (m *ClientInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ClientInfo) XXX_Merge ¶
func (m *ClientInfo) XXX_Merge(src proto.Message)
func (*ClientInfo) XXX_Size ¶
func (m *ClientInfo) XXX_Size() int
func (*ClientInfo) XXX_Unmarshal ¶
func (m *ClientInfo) XXX_Unmarshal(b []byte) error
type ClientServer ¶
type ClientServer interface { Close(context.Context, *CloseReq) (*CloseRsp, error) Latency(context.Context, *LatencyReq) (*LatencyRsp, error) ConnPeer(context.Context, *ConnPeerReq) (*ConnPeerRsp, error) }
ClientServer is the server API for Client service.
type ClientsReq ¶
type ClientsReq struct { MyName string `protobuf:"bytes,1,opt,name=my_name,json=myName,proto3" json:"my_name,omitempty"` Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ClientsReq) Descriptor ¶
func (*ClientsReq) Descriptor() ([]byte, []int)
func (*ClientsReq) GetMyName ¶
func (m *ClientsReq) GetMyName() string
func (*ClientsReq) GetNames ¶
func (m *ClientsReq) GetNames() []string
func (*ClientsReq) Marshal ¶
func (m *ClientsReq) Marshal() (dAtA []byte, err error)
func (*ClientsReq) MarshalToSizedBuffer ¶
func (m *ClientsReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ClientsReq) ProtoMessage ¶
func (*ClientsReq) ProtoMessage()
func (*ClientsReq) Reset ¶
func (m *ClientsReq) Reset()
func (*ClientsReq) Size ¶
func (m *ClientsReq) Size() (n int)
func (*ClientsReq) String ¶
func (m *ClientsReq) String() string
func (*ClientsReq) Unmarshal ¶
func (m *ClientsReq) Unmarshal(dAtA []byte) error
func (*ClientsReq) XXX_DiscardUnknown ¶
func (m *ClientsReq) XXX_DiscardUnknown()
func (*ClientsReq) XXX_Marshal ¶
func (m *ClientsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ClientsReq) XXX_Merge ¶
func (m *ClientsReq) XXX_Merge(src proto.Message)
func (*ClientsReq) XXX_Size ¶
func (m *ClientsReq) XXX_Size() int
func (*ClientsReq) XXX_Unmarshal ¶
func (m *ClientsReq) XXX_Unmarshal(b []byte) error
type ClientsRsp ¶
type ClientsRsp struct { Clients []*ClientInfo `protobuf:"bytes,1,rep,name=clients,proto3" json:"clients,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ClientsRsp) Descriptor ¶
func (*ClientsRsp) Descriptor() ([]byte, []int)
func (*ClientsRsp) GetClients ¶
func (m *ClientsRsp) GetClients() []*ClientInfo
func (*ClientsRsp) Marshal ¶
func (m *ClientsRsp) Marshal() (dAtA []byte, err error)
func (*ClientsRsp) MarshalToSizedBuffer ¶
func (m *ClientsRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ClientsRsp) ProtoMessage ¶
func (*ClientsRsp) ProtoMessage()
func (*ClientsRsp) Reset ¶
func (m *ClientsRsp) Reset()
func (*ClientsRsp) Size ¶
func (m *ClientsRsp) Size() (n int)
func (*ClientsRsp) String ¶
func (m *ClientsRsp) String() string
func (*ClientsRsp) Unmarshal ¶
func (m *ClientsRsp) Unmarshal(dAtA []byte) error
func (*ClientsRsp) XXX_DiscardUnknown ¶
func (m *ClientsRsp) XXX_DiscardUnknown()
func (*ClientsRsp) XXX_Marshal ¶
func (m *ClientsRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ClientsRsp) XXX_Merge ¶
func (m *ClientsRsp) XXX_Merge(src proto.Message)
func (*ClientsRsp) XXX_Size ¶
func (m *ClientsRsp) XXX_Size() int
func (*ClientsRsp) XXX_Unmarshal ¶
func (m *ClientsRsp) XXX_Unmarshal(b []byte) error
type CloseReq ¶
type CloseReq struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CloseReq) Descriptor ¶
func (*CloseReq) MarshalToSizedBuffer ¶
func (*CloseReq) ProtoMessage ¶
func (*CloseReq) ProtoMessage()
func (*CloseReq) XXX_DiscardUnknown ¶
func (m *CloseReq) XXX_DiscardUnknown()
func (*CloseReq) XXX_Marshal ¶
func (*CloseReq) XXX_Unmarshal ¶
type CloseRsp ¶
type CloseRsp struct { Err *Err `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CloseRsp) Descriptor ¶
func (*CloseRsp) MarshalToSizedBuffer ¶
func (*CloseRsp) ProtoMessage ¶
func (*CloseRsp) ProtoMessage()
func (*CloseRsp) XXX_DiscardUnknown ¶
func (m *CloseRsp) XXX_DiscardUnknown()
func (*CloseRsp) XXX_Marshal ¶
func (*CloseRsp) XXX_Unmarshal ¶
type ConnPeerReq ¶
type ConnPeerReq struct { Client *ClientInfo `protobuf:"bytes,1,opt,name=client,proto3" json:"client,omitempty"` Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Frequency int32 `protobuf:"varint,3,opt,name=frequency,proto3" json:"frequency,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ConnPeerReq) Descriptor ¶
func (*ConnPeerReq) Descriptor() ([]byte, []int)
func (*ConnPeerReq) GetClient ¶
func (m *ConnPeerReq) GetClient() *ClientInfo
func (*ConnPeerReq) GetFrequency ¶
func (m *ConnPeerReq) GetFrequency() int32
func (*ConnPeerReq) GetTimestamp ¶
func (m *ConnPeerReq) GetTimestamp() int64
func (*ConnPeerReq) Marshal ¶
func (m *ConnPeerReq) Marshal() (dAtA []byte, err error)
func (*ConnPeerReq) MarshalToSizedBuffer ¶
func (m *ConnPeerReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ConnPeerReq) ProtoMessage ¶
func (*ConnPeerReq) ProtoMessage()
func (*ConnPeerReq) Reset ¶
func (m *ConnPeerReq) Reset()
func (*ConnPeerReq) Size ¶
func (m *ConnPeerReq) Size() (n int)
func (*ConnPeerReq) String ¶
func (m *ConnPeerReq) String() string
func (*ConnPeerReq) Unmarshal ¶
func (m *ConnPeerReq) Unmarshal(dAtA []byte) error
func (*ConnPeerReq) XXX_DiscardUnknown ¶
func (m *ConnPeerReq) XXX_DiscardUnknown()
func (*ConnPeerReq) XXX_Marshal ¶
func (m *ConnPeerReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConnPeerReq) XXX_Merge ¶
func (m *ConnPeerReq) XXX_Merge(src proto.Message)
func (*ConnPeerReq) XXX_Size ¶
func (m *ConnPeerReq) XXX_Size() int
func (*ConnPeerReq) XXX_Unmarshal ¶
func (m *ConnPeerReq) XXX_Unmarshal(b []byte) error
type ConnPeerRsp ¶
type ConnPeerRsp struct { Client *ClientInfo `protobuf:"bytes,1,opt,name=client,proto3" json:"client,omitempty"` Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Status ConnPeerRsp_STATUS `protobuf:"varint,3,opt,name=status,proto3,enum=pb.ConnPeerRsp_STATUS" json:"status,omitempty"` Err *Err `protobuf:"bytes,4,opt,name=err,proto3" json:"err,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ConnPeerRsp) Descriptor ¶
func (*ConnPeerRsp) Descriptor() ([]byte, []int)
func (*ConnPeerRsp) GetClient ¶
func (m *ConnPeerRsp) GetClient() *ClientInfo
func (*ConnPeerRsp) GetErr ¶
func (m *ConnPeerRsp) GetErr() *Err
func (*ConnPeerRsp) GetStatus ¶
func (m *ConnPeerRsp) GetStatus() ConnPeerRsp_STATUS
func (*ConnPeerRsp) GetTimestamp ¶
func (m *ConnPeerRsp) GetTimestamp() int64
func (*ConnPeerRsp) Marshal ¶
func (m *ConnPeerRsp) Marshal() (dAtA []byte, err error)
func (*ConnPeerRsp) MarshalToSizedBuffer ¶
func (m *ConnPeerRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ConnPeerRsp) ProtoMessage ¶
func (*ConnPeerRsp) ProtoMessage()
func (*ConnPeerRsp) Reset ¶
func (m *ConnPeerRsp) Reset()
func (*ConnPeerRsp) Size ¶
func (m *ConnPeerRsp) Size() (n int)
func (*ConnPeerRsp) String ¶
func (m *ConnPeerRsp) String() string
func (*ConnPeerRsp) Unmarshal ¶
func (m *ConnPeerRsp) Unmarshal(dAtA []byte) error
func (*ConnPeerRsp) XXX_DiscardUnknown ¶
func (m *ConnPeerRsp) XXX_DiscardUnknown()
func (*ConnPeerRsp) XXX_Marshal ¶
func (m *ConnPeerRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConnPeerRsp) XXX_Merge ¶
func (m *ConnPeerRsp) XXX_Merge(src proto.Message)
func (*ConnPeerRsp) XXX_Size ¶
func (m *ConnPeerRsp) XXX_Size() int
func (*ConnPeerRsp) XXX_Unmarshal ¶
func (m *ConnPeerRsp) XXX_Unmarshal(b []byte) error
type ConnPeerRsp_STATUS ¶
type ConnPeerRsp_STATUS int32
const ( ConnPeerRsp_Succ ConnPeerRsp_STATUS = 0 ConnPeerRsp_Fail ConnPeerRsp_STATUS = 1 )
func (ConnPeerRsp_STATUS) EnumDescriptor ¶
func (ConnPeerRsp_STATUS) EnumDescriptor() ([]byte, []int)
func (ConnPeerRsp_STATUS) String ¶
func (x ConnPeerRsp_STATUS) String() string
type Err ¶
type Err struct { Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Err) Descriptor ¶
func (*Err) ProtoMessage ¶
func (*Err) ProtoMessage()
func (*Err) XXX_DiscardUnknown ¶
func (m *Err) XXX_DiscardUnknown()
func (*Err) XXX_Unmarshal ¶
type LatencyReq ¶
type LatencyReq struct { Ts int64 `protobuf:"varint,1,opt,name=ts,proto3" json:"ts,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LatencyReq) Descriptor ¶
func (*LatencyReq) Descriptor() ([]byte, []int)
func (*LatencyReq) GetTs ¶
func (m *LatencyReq) GetTs() int64
func (*LatencyReq) Marshal ¶
func (m *LatencyReq) Marshal() (dAtA []byte, err error)
func (*LatencyReq) MarshalToSizedBuffer ¶
func (m *LatencyReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LatencyReq) ProtoMessage ¶
func (*LatencyReq) ProtoMessage()
func (*LatencyReq) Reset ¶
func (m *LatencyReq) Reset()
func (*LatencyReq) Size ¶
func (m *LatencyReq) Size() (n int)
func (*LatencyReq) String ¶
func (m *LatencyReq) String() string
func (*LatencyReq) Unmarshal ¶
func (m *LatencyReq) Unmarshal(dAtA []byte) error
func (*LatencyReq) XXX_DiscardUnknown ¶
func (m *LatencyReq) XXX_DiscardUnknown()
func (*LatencyReq) XXX_Marshal ¶
func (m *LatencyReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LatencyReq) XXX_Merge ¶
func (m *LatencyReq) XXX_Merge(src proto.Message)
func (*LatencyReq) XXX_Size ¶
func (m *LatencyReq) XXX_Size() int
func (*LatencyReq) XXX_Unmarshal ¶
func (m *LatencyReq) XXX_Unmarshal(b []byte) error
type LatencyRsp ¶
type LatencyRsp struct { Ts int64 `protobuf:"varint,1,opt,name=ts,proto3" json:"ts,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LatencyRsp) Descriptor ¶
func (*LatencyRsp) Descriptor() ([]byte, []int)
func (*LatencyRsp) GetTs ¶
func (m *LatencyRsp) GetTs() int64
func (*LatencyRsp) Marshal ¶
func (m *LatencyRsp) Marshal() (dAtA []byte, err error)
func (*LatencyRsp) MarshalToSizedBuffer ¶
func (m *LatencyRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LatencyRsp) ProtoMessage ¶
func (*LatencyRsp) ProtoMessage()
func (*LatencyRsp) Reset ¶
func (m *LatencyRsp) Reset()
func (*LatencyRsp) Size ¶
func (m *LatencyRsp) Size() (n int)
func (*LatencyRsp) String ¶
func (m *LatencyRsp) String() string
func (*LatencyRsp) Unmarshal ¶
func (m *LatencyRsp) Unmarshal(dAtA []byte) error
func (*LatencyRsp) XXX_DiscardUnknown ¶
func (m *LatencyRsp) XXX_DiscardUnknown()
func (*LatencyRsp) XXX_Marshal ¶
func (m *LatencyRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LatencyRsp) XXX_Merge ¶
func (m *LatencyRsp) XXX_Merge(src proto.Message)
func (*LatencyRsp) XXX_Size ¶
func (m *LatencyRsp) XXX_Size() int
func (*LatencyRsp) XXX_Unmarshal ¶
func (m *LatencyRsp) XXX_Unmarshal(b []byte) error
type PeerCliClient ¶
type PeerCliClient interface {
Close(ctx context.Context, in *CloseReq, opts ...grpc.CallOption) (*CloseRsp, error)
}
PeerCliClient is the client API for PeerCli service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPeerCliClient ¶
func NewPeerCliClient(cc *grpc.ClientConn) PeerCliClient
type PeerCliServer ¶
PeerCliServer is the server API for PeerCli service.
type PeerSvcClient ¶
type PeerSvcClient interface { Close(ctx context.Context, in *CloseReq, opts ...grpc.CallOption) (*CloseRsp, error) Auth(ctx context.Context, in *AuthReq, opts ...grpc.CallOption) (*AuthRsp, error) Stream(ctx context.Context, in *StreamReq, opts ...grpc.CallOption) (*StreamRsp, error) }
PeerSvcClient is the client API for PeerSvc service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPeerSvcClient ¶
func NewPeerSvcClient(cc *grpc.ClientConn) PeerSvcClient
type PeerSvcServer ¶
type PeerSvcServer interface { Close(context.Context, *CloseReq) (*CloseRsp, error) Auth(context.Context, *AuthReq) (*AuthRsp, error) Stream(context.Context, *StreamReq) (*StreamRsp, error) }
PeerSvcServer is the server API for PeerSvc service.
type ServiceClient ¶
type ServiceClient interface { Close(ctx context.Context, in *CloseReq, opts ...grpc.CallOption) (*CloseRsp, error) Latency(ctx context.Context, in *LatencyReq, opts ...grpc.CallOption) (*LatencyRsp, error) Auth(ctx context.Context, in *AuthReq, opts ...grpc.CallOption) (*AuthRsp, error) Clients(ctx context.Context, in *ClientsReq, opts ...grpc.CallOption) (*ClientsRsp, error) ConnPeer(ctx context.Context, in *ConnPeerReq, opts ...grpc.CallOption) (*ConnPeerRsp, error) }
ServiceClient is the client API for Service service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewServiceClient ¶
func NewServiceClient(cc *grpc.ClientConn) ServiceClient
type ServiceServer ¶
type ServiceServer interface { Close(context.Context, *CloseReq) (*CloseRsp, error) Latency(context.Context, *LatencyReq) (*LatencyRsp, error) Auth(context.Context, *AuthReq) (*AuthRsp, error) Clients(context.Context, *ClientsReq) (*ClientsRsp, error) ConnPeer(context.Context, *ConnPeerReq) (*ConnPeerRsp, error) }
ServiceServer is the server API for Service service.
type StreamReq ¶
type StreamReq struct { Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` Network Network `protobuf:"varint,2,opt,name=network,proto3,enum=pb.Network" json:"network,omitempty"` Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StreamReq) Descriptor ¶
func (*StreamReq) GetNetwork ¶
func (*StreamReq) MarshalToSizedBuffer ¶
func (*StreamReq) ProtoMessage ¶
func (*StreamReq) ProtoMessage()
func (*StreamReq) XXX_DiscardUnknown ¶
func (m *StreamReq) XXX_DiscardUnknown()
func (*StreamReq) XXX_Marshal ¶
func (*StreamReq) XXX_Unmarshal ¶
type StreamRsp ¶
type StreamRsp struct { Body []byte `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` Err *Err `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StreamRsp) Descriptor ¶
func (*StreamRsp) MarshalToSizedBuffer ¶
func (*StreamRsp) ProtoMessage ¶
func (*StreamRsp) ProtoMessage()
func (*StreamRsp) XXX_DiscardUnknown ¶
func (m *StreamRsp) XXX_DiscardUnknown()
func (*StreamRsp) XXX_Marshal ¶
func (*StreamRsp) XXX_Unmarshal ¶
type UnimplementedClientServer ¶
type UnimplementedClientServer struct { }
UnimplementedClientServer can be embedded to have forward compatible implementations.
func (*UnimplementedClientServer) ConnPeer ¶
func (*UnimplementedClientServer) ConnPeer(ctx context.Context, req *ConnPeerReq) (*ConnPeerRsp, error)
func (*UnimplementedClientServer) Latency ¶
func (*UnimplementedClientServer) Latency(ctx context.Context, req *LatencyReq) (*LatencyRsp, error)
type UnimplementedPeerCliServer ¶
type UnimplementedPeerCliServer struct { }
UnimplementedPeerCliServer can be embedded to have forward compatible implementations.
type UnimplementedPeerSvcServer ¶
type UnimplementedPeerSvcServer struct { }
UnimplementedPeerSvcServer can be embedded to have forward compatible implementations.
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedServiceServer) Clients ¶
func (*UnimplementedServiceServer) Clients(ctx context.Context, req *ClientsReq) (*ClientsRsp, error)
func (*UnimplementedServiceServer) ConnPeer ¶
func (*UnimplementedServiceServer) ConnPeer(ctx context.Context, req *ConnPeerReq) (*ConnPeerRsp, error)
func (*UnimplementedServiceServer) Latency ¶
func (*UnimplementedServiceServer) Latency(ctx context.Context, req *LatencyReq) (*LatencyRsp, error)