Documentation ¶
Overview ¶
Package pb is a generated protocol buffer package.
It is generated from these files:
pb/protocol.proto
It has these top-level messages:
RouterRequest RouterResponse HeartRequest HeartResponse ListenReq StreamRsp
Index ¶
- func RegisterSynchronizerServer(s *grpc.Server, srv SynchronizerServer)
- type HeartRequest
- func (*HeartRequest) Descriptor() ([]byte, []int)
- func (m *HeartRequest) GetIp() string
- func (m *HeartRequest) GetMsg() []byte
- func (m *HeartRequest) GetName() string
- func (m *HeartRequest) GetRouterType() string
- func (m *HeartRequest) GetServerName() string
- func (*HeartRequest) ProtoMessage()
- func (m *HeartRequest) Reset()
- func (m *HeartRequest) String() string
- type HeartResponse
- type ListenReq
- type RouterRequest
- type RouterResponse
- type StreamRsp
- type SynchronizerClient
- type SynchronizerServer
- type Synchronizer_ListenClient
- type Synchronizer_ListenServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterSynchronizerServer ¶
func RegisterSynchronizerServer(s *grpc.Server, srv SynchronizerServer)
Types ¶
type HeartRequest ¶
type HeartRequest struct { RouterType string `protobuf:"bytes,1,opt,name=routerType" json:"routerType,omitempty"` ServerName string `protobuf:"bytes,2,opt,name=serverName" json:"serverName,omitempty"` Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` Ip string `protobuf:"bytes,4,opt,name=ip" json:"ip,omitempty"` Msg []byte `protobuf:"bytes,5,opt,name=msg,proto3" json:"msg,omitempty"` }
func (*HeartRequest) Descriptor ¶
func (*HeartRequest) Descriptor() ([]byte, []int)
func (*HeartRequest) GetIp ¶
func (m *HeartRequest) GetIp() string
func (*HeartRequest) GetMsg ¶
func (m *HeartRequest) GetMsg() []byte
func (*HeartRequest) GetName ¶
func (m *HeartRequest) GetName() string
func (*HeartRequest) GetRouterType ¶
func (m *HeartRequest) GetRouterType() string
func (*HeartRequest) GetServerName ¶
func (m *HeartRequest) GetServerName() string
func (*HeartRequest) ProtoMessage ¶
func (*HeartRequest) ProtoMessage()
func (*HeartRequest) Reset ¶
func (m *HeartRequest) Reset()
func (*HeartRequest) String ¶
func (m *HeartRequest) String() string
type HeartResponse ¶
type HeartResponse struct {
Code string `protobuf:"bytes,1,opt,name=code" json:"code,omitempty"`
}
func (*HeartResponse) Descriptor ¶
func (*HeartResponse) Descriptor() ([]byte, []int)
func (*HeartResponse) GetCode ¶
func (m *HeartResponse) GetCode() string
func (*HeartResponse) ProtoMessage ¶
func (*HeartResponse) ProtoMessage()
func (*HeartResponse) Reset ¶
func (m *HeartResponse) Reset()
func (*HeartResponse) String ¶
func (m *HeartResponse) String() string
type ListenReq ¶
type ListenReq struct { ServerName string `protobuf:"bytes,1,opt,name=serverName" json:"serverName,omitempty"` Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` Ip string `protobuf:"bytes,3,opt,name=ip" json:"ip,omitempty"` }
The request listen
func (*ListenReq) Descriptor ¶
func (*ListenReq) GetServerName ¶
func (*ListenReq) ProtoMessage ¶
func (*ListenReq) ProtoMessage()
type RouterRequest ¶
type RouterRequest struct { RouterType string `protobuf:"bytes,1,opt,name=routerType" json:"routerType,omitempty"` RouterName string `protobuf:"bytes,2,opt,name=routerName" json:"routerName,omitempty"` Msg []byte `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"` }
func (*RouterRequest) Descriptor ¶
func (*RouterRequest) Descriptor() ([]byte, []int)
func (*RouterRequest) GetMsg ¶
func (m *RouterRequest) GetMsg() []byte
func (*RouterRequest) GetRouterName ¶
func (m *RouterRequest) GetRouterName() string
func (*RouterRequest) GetRouterType ¶
func (m *RouterRequest) GetRouterType() string
func (*RouterRequest) ProtoMessage ¶
func (*RouterRequest) ProtoMessage()
func (*RouterRequest) Reset ¶
func (m *RouterRequest) Reset()
func (*RouterRequest) String ¶
func (m *RouterRequest) String() string
type RouterResponse ¶
type RouterResponse struct {
Code string `protobuf:"bytes,1,opt,name=code" json:"code,omitempty"`
}
func (*RouterResponse) Descriptor ¶
func (*RouterResponse) Descriptor() ([]byte, []int)
func (*RouterResponse) GetCode ¶
func (m *RouterResponse) GetCode() string
func (*RouterResponse) ProtoMessage ¶
func (*RouterResponse) ProtoMessage()
func (*RouterResponse) Reset ¶
func (m *RouterResponse) Reset()
func (*RouterResponse) String ¶
func (m *RouterResponse) String() string
type StreamRsp ¶
type StreamRsp struct {
Msg []byte `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
}
The stream rsp
func (*StreamRsp) Descriptor ¶
func (*StreamRsp) ProtoMessage ¶
func (*StreamRsp) ProtoMessage()
type SynchronizerClient ¶
type SynchronizerClient interface { Router(ctx context.Context, in *RouterRequest, opts ...grpc.CallOption) (*RouterResponse, error) Heart(ctx context.Context, in *HeartRequest, opts ...grpc.CallOption) (*HeartResponse, error) Listen(ctx context.Context, opts ...grpc.CallOption) (Synchronizer_ListenClient, error) }
func NewSynchronizerClient ¶
func NewSynchronizerClient(cc *grpc.ClientConn) SynchronizerClient
type SynchronizerServer ¶
type SynchronizerServer interface { Router(context.Context, *RouterRequest) (*RouterResponse, error) Heart(context.Context, *HeartRequest) (*HeartResponse, error) Listen(Synchronizer_ListenServer) error }
Click to show internal directories.
Click to hide internal directories.