Documentation ¶
Overview ¶
Package clusterpb is a generated protocol buffer package.
It is generated from these files:
cluster.proto
It has these top-level messages:
MemberInfo RegisterRequest RegisterResponse UnregisterRequest UnregisterResponse RequestMessage NotifyMessage ResponseMessage PushMessage MemberHandleResponse NewMemberRequest NewMemberResponse DelMemberRequest DelMemberResponse SessionClosedRequest SessionClosedResponse CloseSessionRequest CloseSessionResponse
Index ¶
- func RegisterMasterServer(s *grpc.Server, srv MasterServer)
- func RegisterMemberServer(s *grpc.Server, srv MemberServer)
- type CloseSessionRequest
- type CloseSessionResponse
- type DelMemberRequest
- type DelMemberResponse
- type MasterClient
- type MasterServer
- type MemberClient
- type MemberHandleResponse
- type MemberInfo
- type MemberServer
- type NewMemberRequest
- type NewMemberResponse
- type NotifyMessage
- func (*NotifyMessage) Descriptor() ([]byte, []int)
- func (m *NotifyMessage) GetData() []byte
- func (m *NotifyMessage) GetGateAddr() string
- func (m *NotifyMessage) GetRoute() string
- func (m *NotifyMessage) GetSessionId() int64
- func (*NotifyMessage) ProtoMessage()
- func (m *NotifyMessage) Reset()
- func (m *NotifyMessage) String() string
- type PushMessage
- type RegisterRequest
- type RegisterResponse
- type RequestMessage
- func (*RequestMessage) Descriptor() ([]byte, []int)
- func (m *RequestMessage) GetData() []byte
- func (m *RequestMessage) GetGateAddr() string
- func (m *RequestMessage) GetId() uint64
- func (m *RequestMessage) GetRoute() string
- func (m *RequestMessage) GetSessionId() int64
- func (*RequestMessage) ProtoMessage()
- func (m *RequestMessage) Reset()
- func (m *RequestMessage) String() string
- type ResponseMessage
- type SessionClosedRequest
- type SessionClosedResponse
- type UnregisterRequest
- type UnregisterResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterMasterServer ¶
func RegisterMasterServer(s *grpc.Server, srv MasterServer)
func RegisterMemberServer ¶
func RegisterMemberServer(s *grpc.Server, srv MemberServer)
Types ¶
type CloseSessionRequest ¶
type CloseSessionRequest struct {
SessionId int64 `protobuf:"varint,1,opt,name=sessionId" json:"sessionId"`
}
func (*CloseSessionRequest) Descriptor ¶
func (*CloseSessionRequest) Descriptor() ([]byte, []int)
func (*CloseSessionRequest) GetSessionId ¶
func (m *CloseSessionRequest) GetSessionId() int64
func (*CloseSessionRequest) ProtoMessage ¶
func (*CloseSessionRequest) ProtoMessage()
func (*CloseSessionRequest) Reset ¶
func (m *CloseSessionRequest) Reset()
func (*CloseSessionRequest) String ¶
func (m *CloseSessionRequest) String() string
type CloseSessionResponse ¶
type CloseSessionResponse struct { }
func (*CloseSessionResponse) Descriptor ¶
func (*CloseSessionResponse) Descriptor() ([]byte, []int)
func (*CloseSessionResponse) ProtoMessage ¶
func (*CloseSessionResponse) ProtoMessage()
func (*CloseSessionResponse) Reset ¶
func (m *CloseSessionResponse) Reset()
func (*CloseSessionResponse) String ¶
func (m *CloseSessionResponse) String() string
type DelMemberRequest ¶
type DelMemberRequest struct {
ServiceAddr string `protobuf:"bytes,1,opt,name=serviceAddr" json:"serviceAddr"`
}
func (*DelMemberRequest) Descriptor ¶
func (*DelMemberRequest) Descriptor() ([]byte, []int)
func (*DelMemberRequest) GetServiceAddr ¶
func (m *DelMemberRequest) GetServiceAddr() string
func (*DelMemberRequest) ProtoMessage ¶
func (*DelMemberRequest) ProtoMessage()
func (*DelMemberRequest) Reset ¶
func (m *DelMemberRequest) Reset()
func (*DelMemberRequest) String ¶
func (m *DelMemberRequest) String() string
type DelMemberResponse ¶
type DelMemberResponse struct { }
func (*DelMemberResponse) Descriptor ¶
func (*DelMemberResponse) Descriptor() ([]byte, []int)
func (*DelMemberResponse) ProtoMessage ¶
func (*DelMemberResponse) ProtoMessage()
func (*DelMemberResponse) Reset ¶
func (m *DelMemberResponse) Reset()
func (*DelMemberResponse) String ¶
func (m *DelMemberResponse) String() string
type MasterClient ¶
type MasterClient interface { Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) Unregister(ctx context.Context, in *UnregisterRequest, opts ...grpc.CallOption) (*UnregisterResponse, error) }
func NewMasterClient ¶
func NewMasterClient(cc *grpc.ClientConn) MasterClient
type MasterServer ¶
type MasterServer interface { Register(context.Context, *RegisterRequest) (*RegisterResponse, error) Unregister(context.Context, *UnregisterRequest) (*UnregisterResponse, error) }
type MemberClient ¶
type MemberClient interface { HandleRequest(ctx context.Context, in *RequestMessage, opts ...grpc.CallOption) (*MemberHandleResponse, error) HandleNotify(ctx context.Context, in *NotifyMessage, opts ...grpc.CallOption) (*MemberHandleResponse, error) HandlePush(ctx context.Context, in *PushMessage, opts ...grpc.CallOption) (*MemberHandleResponse, error) HandleResponse(ctx context.Context, in *ResponseMessage, opts ...grpc.CallOption) (*MemberHandleResponse, error) NewMember(ctx context.Context, in *NewMemberRequest, opts ...grpc.CallOption) (*NewMemberResponse, error) DelMember(ctx context.Context, in *DelMemberRequest, opts ...grpc.CallOption) (*DelMemberResponse, error) SessionClosed(ctx context.Context, in *SessionClosedRequest, opts ...grpc.CallOption) (*SessionClosedResponse, error) CloseSession(ctx context.Context, in *CloseSessionRequest, opts ...grpc.CallOption) (*CloseSessionResponse, error) }
func NewMemberClient ¶
func NewMemberClient(cc *grpc.ClientConn) MemberClient
type MemberHandleResponse ¶
type MemberHandleResponse struct { }
func (*MemberHandleResponse) Descriptor ¶
func (*MemberHandleResponse) Descriptor() ([]byte, []int)
func (*MemberHandleResponse) ProtoMessage ¶
func (*MemberHandleResponse) ProtoMessage()
func (*MemberHandleResponse) Reset ¶
func (m *MemberHandleResponse) Reset()
func (*MemberHandleResponse) String ¶
func (m *MemberHandleResponse) String() string
type MemberInfo ¶
type MemberInfo struct { Label string `protobuf:"bytes,1,opt,name=label" json:"label"` ServiceAddr string `protobuf:"bytes,2,opt,name=serviceAddr" json:"serviceAddr"` Services []string `protobuf:"bytes,3,rep,name=services" json:"services"` }
func (*MemberInfo) Descriptor ¶
func (*MemberInfo) Descriptor() ([]byte, []int)
func (*MemberInfo) GetLabel ¶
func (m *MemberInfo) GetLabel() string
func (*MemberInfo) GetServiceAddr ¶
func (m *MemberInfo) GetServiceAddr() string
func (*MemberInfo) GetServices ¶
func (m *MemberInfo) GetServices() []string
func (*MemberInfo) ProtoMessage ¶
func (*MemberInfo) ProtoMessage()
func (*MemberInfo) Reset ¶
func (m *MemberInfo) Reset()
func (*MemberInfo) String ¶
func (m *MemberInfo) String() string
type MemberServer ¶
type MemberServer interface { HandleRequest(context.Context, *RequestMessage) (*MemberHandleResponse, error) HandleNotify(context.Context, *NotifyMessage) (*MemberHandleResponse, error) HandlePush(context.Context, *PushMessage) (*MemberHandleResponse, error) HandleResponse(context.Context, *ResponseMessage) (*MemberHandleResponse, error) NewMember(context.Context, *NewMemberRequest) (*NewMemberResponse, error) DelMember(context.Context, *DelMemberRequest) (*DelMemberResponse, error) SessionClosed(context.Context, *SessionClosedRequest) (*SessionClosedResponse, error) CloseSession(context.Context, *CloseSessionRequest) (*CloseSessionResponse, error) }
type NewMemberRequest ¶
type NewMemberRequest struct {
MemberInfo *MemberInfo `protobuf:"bytes,1,opt,name=memberInfo" json:"memberInfo"`
}
func (*NewMemberRequest) Descriptor ¶
func (*NewMemberRequest) Descriptor() ([]byte, []int)
func (*NewMemberRequest) GetMemberInfo ¶
func (m *NewMemberRequest) GetMemberInfo() *MemberInfo
func (*NewMemberRequest) ProtoMessage ¶
func (*NewMemberRequest) ProtoMessage()
func (*NewMemberRequest) Reset ¶
func (m *NewMemberRequest) Reset()
func (*NewMemberRequest) String ¶
func (m *NewMemberRequest) String() string
type NewMemberResponse ¶
type NewMemberResponse struct { }
func (*NewMemberResponse) Descriptor ¶
func (*NewMemberResponse) Descriptor() ([]byte, []int)
func (*NewMemberResponse) ProtoMessage ¶
func (*NewMemberResponse) ProtoMessage()
func (*NewMemberResponse) Reset ¶
func (m *NewMemberResponse) Reset()
func (*NewMemberResponse) String ¶
func (m *NewMemberResponse) String() string
type NotifyMessage ¶
type NotifyMessage struct { GateAddr string `protobuf:"bytes,1,opt,name=gateAddr" json:"gateAddr"` SessionId int64 `protobuf:"varint,2,opt,name=sessionId" json:"sessionId"` Route string `protobuf:"bytes,3,opt,name=route" json:"route"` Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data"` }
func (*NotifyMessage) Descriptor ¶
func (*NotifyMessage) Descriptor() ([]byte, []int)
func (*NotifyMessage) GetData ¶
func (m *NotifyMessage) GetData() []byte
func (*NotifyMessage) GetGateAddr ¶
func (m *NotifyMessage) GetGateAddr() string
func (*NotifyMessage) GetRoute ¶
func (m *NotifyMessage) GetRoute() string
func (*NotifyMessage) GetSessionId ¶
func (m *NotifyMessage) GetSessionId() int64
func (*NotifyMessage) ProtoMessage ¶
func (*NotifyMessage) ProtoMessage()
func (*NotifyMessage) Reset ¶
func (m *NotifyMessage) Reset()
func (*NotifyMessage) String ¶
func (m *NotifyMessage) String() string
type PushMessage ¶
type PushMessage struct { SessionId int64 `protobuf:"varint,1,opt,name=sessionId" json:"sessionId"` Route string `protobuf:"bytes,2,opt,name=route" json:"route"` Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data"` }
func (*PushMessage) Descriptor ¶
func (*PushMessage) Descriptor() ([]byte, []int)
func (*PushMessage) GetData ¶
func (m *PushMessage) GetData() []byte
func (*PushMessage) GetRoute ¶
func (m *PushMessage) GetRoute() string
func (*PushMessage) GetSessionId ¶
func (m *PushMessage) GetSessionId() int64
func (*PushMessage) ProtoMessage ¶
func (*PushMessage) ProtoMessage()
func (*PushMessage) Reset ¶
func (m *PushMessage) Reset()
func (*PushMessage) String ¶
func (m *PushMessage) String() string
type RegisterRequest ¶
type RegisterRequest struct {
MemberInfo *MemberInfo `protobuf:"bytes,1,opt,name=memberInfo" json:"memberInfo"`
}
func (*RegisterRequest) Descriptor ¶
func (*RegisterRequest) Descriptor() ([]byte, []int)
func (*RegisterRequest) GetMemberInfo ¶
func (m *RegisterRequest) GetMemberInfo() *MemberInfo
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) Reset ¶
func (m *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (m *RegisterRequest) String() string
type RegisterResponse ¶
type RegisterResponse struct {
Members []*MemberInfo `protobuf:"bytes,1,rep,name=members" json:"members"`
}
func (*RegisterResponse) Descriptor ¶
func (*RegisterResponse) Descriptor() ([]byte, []int)
func (*RegisterResponse) GetMembers ¶
func (m *RegisterResponse) GetMembers() []*MemberInfo
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) Reset ¶
func (m *RegisterResponse) Reset()
func (*RegisterResponse) String ¶
func (m *RegisterResponse) String() string
type RequestMessage ¶
type RequestMessage struct { GateAddr string `protobuf:"bytes,1,opt,name=gateAddr" json:"gateAddr"` SessionId int64 `protobuf:"varint,2,opt,name=sessionId" json:"sessionId"` Id uint64 `protobuf:"varint,3,opt,name=id" json:"id"` Route string `protobuf:"bytes,4,opt,name=route" json:"route"` Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data"` }
func (*RequestMessage) Descriptor ¶
func (*RequestMessage) Descriptor() ([]byte, []int)
func (*RequestMessage) GetData ¶
func (m *RequestMessage) GetData() []byte
func (*RequestMessage) GetGateAddr ¶
func (m *RequestMessage) GetGateAddr() string
func (*RequestMessage) GetId ¶
func (m *RequestMessage) GetId() uint64
func (*RequestMessage) GetRoute ¶
func (m *RequestMessage) GetRoute() string
func (*RequestMessage) GetSessionId ¶
func (m *RequestMessage) GetSessionId() int64
func (*RequestMessage) ProtoMessage ¶
func (*RequestMessage) ProtoMessage()
func (*RequestMessage) Reset ¶
func (m *RequestMessage) Reset()
func (*RequestMessage) String ¶
func (m *RequestMessage) String() string
type ResponseMessage ¶
type ResponseMessage struct { SessionId int64 `protobuf:"varint,1,opt,name=sessionId" json:"sessionId"` Id uint64 `protobuf:"varint,2,opt,name=id" json:"id"` Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data"` }
func (*ResponseMessage) Descriptor ¶
func (*ResponseMessage) Descriptor() ([]byte, []int)
func (*ResponseMessage) GetData ¶
func (m *ResponseMessage) GetData() []byte
func (*ResponseMessage) GetId ¶
func (m *ResponseMessage) GetId() uint64
func (*ResponseMessage) GetSessionId ¶
func (m *ResponseMessage) GetSessionId() int64
func (*ResponseMessage) ProtoMessage ¶
func (*ResponseMessage) ProtoMessage()
func (*ResponseMessage) Reset ¶
func (m *ResponseMessage) Reset()
func (*ResponseMessage) String ¶
func (m *ResponseMessage) String() string
type SessionClosedRequest ¶
type SessionClosedRequest struct {
SessionId int64 `protobuf:"varint,1,opt,name=sessionId" json:"sessionId"`
}
func (*SessionClosedRequest) Descriptor ¶
func (*SessionClosedRequest) Descriptor() ([]byte, []int)
func (*SessionClosedRequest) GetSessionId ¶
func (m *SessionClosedRequest) GetSessionId() int64
func (*SessionClosedRequest) ProtoMessage ¶
func (*SessionClosedRequest) ProtoMessage()
func (*SessionClosedRequest) Reset ¶
func (m *SessionClosedRequest) Reset()
func (*SessionClosedRequest) String ¶
func (m *SessionClosedRequest) String() string
type SessionClosedResponse ¶
type SessionClosedResponse struct { }
func (*SessionClosedResponse) Descriptor ¶
func (*SessionClosedResponse) Descriptor() ([]byte, []int)
func (*SessionClosedResponse) ProtoMessage ¶
func (*SessionClosedResponse) ProtoMessage()
func (*SessionClosedResponse) Reset ¶
func (m *SessionClosedResponse) Reset()
func (*SessionClosedResponse) String ¶
func (m *SessionClosedResponse) String() string
type UnregisterRequest ¶
type UnregisterRequest struct {
ServiceAddr string `protobuf:"bytes,1,opt,name=serviceAddr" json:"serviceAddr"`
}
func (*UnregisterRequest) Descriptor ¶
func (*UnregisterRequest) Descriptor() ([]byte, []int)
func (*UnregisterRequest) GetServiceAddr ¶
func (m *UnregisterRequest) GetServiceAddr() string
func (*UnregisterRequest) ProtoMessage ¶
func (*UnregisterRequest) ProtoMessage()
func (*UnregisterRequest) Reset ¶
func (m *UnregisterRequest) Reset()
func (*UnregisterRequest) String ¶
func (m *UnregisterRequest) String() string
type UnregisterResponse ¶
type UnregisterResponse struct { }
func (*UnregisterResponse) Descriptor ¶
func (*UnregisterResponse) Descriptor() ([]byte, []int)
func (*UnregisterResponse) ProtoMessage ¶
func (*UnregisterResponse) ProtoMessage()
func (*UnregisterResponse) Reset ¶
func (m *UnregisterResponse) Reset()
func (*UnregisterResponse) String ¶
func (m *UnregisterResponse) String() string
Click to show internal directories.
Click to hide internal directories.