Documentation ¶
Index ¶
- Variables
- func RegisterImServer(s *roc.Service, h ImServer)
- type ConnectReq
- func (*ConnectReq) Descriptor() ([]byte, []int)
- func (m *ConnectReq) GetUserName() string
- func (m *ConnectReq) Marshal() (dAtA []byte, err error)
- func (m *ConnectReq) MarshalTo(dAtA []byte) (int, error)
- func (m *ConnectReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ConnectReq) ProtoMessage()
- func (m *ConnectReq) Reset()
- func (m *ConnectReq) Size() (n int)
- func (m *ConnectReq) String() string
- func (m *ConnectReq) Unmarshal(dAtA []byte) error
- func (m *ConnectReq) XXX_DiscardUnknown()
- func (m *ConnectReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConnectReq) XXX_Merge(src proto.Message)
- func (m *ConnectReq) XXX_Size() int
- func (m *ConnectReq) XXX_Unmarshal(b []byte) error
- type ConnectRsp
- func (*ConnectRsp) Descriptor() ([]byte, []int)
- func (m *ConnectRsp) GetIsConnect() bool
- func (m *ConnectRsp) Marshal() (dAtA []byte, err error)
- func (m *ConnectRsp) MarshalTo(dAtA []byte) (int, error)
- func (m *ConnectRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ConnectRsp) ProtoMessage()
- func (m *ConnectRsp) Reset()
- func (m *ConnectRsp) Size() (n int)
- func (m *ConnectRsp) String() string
- func (m *ConnectRsp) Unmarshal(dAtA []byte) error
- func (m *ConnectRsp) XXX_DiscardUnknown()
- func (m *ConnectRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConnectRsp) XXX_Merge(src proto.Message)
- func (m *ConnectRsp) XXX_Size() int
- func (m *ConnectRsp) XXX_Unmarshal(b []byte) error
- type CountReq
- func (*CountReq) Descriptor() ([]byte, []int)
- func (m *CountReq) GetPrefix() string
- func (m *CountReq) Marshal() (dAtA []byte, err error)
- func (m *CountReq) MarshalTo(dAtA []byte) (int, error)
- func (m *CountReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CountReq) ProtoMessage()
- func (m *CountReq) Reset()
- func (m *CountReq) Size() (n int)
- func (m *CountReq) String() string
- func (m *CountReq) Unmarshal(dAtA []byte) error
- func (m *CountReq) XXX_DiscardUnknown()
- func (m *CountReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CountReq) XXX_Merge(src proto.Message)
- func (m *CountReq) XXX_Size() int
- func (m *CountReq) XXX_Unmarshal(b []byte) error
- type CountRsp
- func (*CountRsp) Descriptor() ([]byte, []int)
- func (m *CountRsp) GetCount() uint32
- func (m *CountRsp) Marshal() (dAtA []byte, err error)
- func (m *CountRsp) MarshalTo(dAtA []byte) (int, error)
- func (m *CountRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CountRsp) ProtoMessage()
- func (m *CountRsp) Reset()
- func (m *CountRsp) Size() (n int)
- func (m *CountRsp) String() string
- func (m *CountRsp) Unmarshal(dAtA []byte) error
- func (m *CountRsp) XXX_DiscardUnknown()
- func (m *CountRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CountRsp) XXX_Merge(src proto.Message)
- func (m *CountRsp) XXX_Size() int
- func (m *CountRsp) XXX_Unmarshal(b []byte) error
- type ImClient
- type ImServer
- type SendMessageReq
- func (*SendMessageReq) Descriptor() ([]byte, []int)
- func (m *SendMessageReq) GetMessage() string
- func (m *SendMessageReq) Marshal() (dAtA []byte, err error)
- func (m *SendMessageReq) MarshalTo(dAtA []byte) (int, error)
- func (m *SendMessageReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SendMessageReq) ProtoMessage()
- func (m *SendMessageReq) Reset()
- func (m *SendMessageReq) Size() (n int)
- func (m *SendMessageReq) String() string
- func (m *SendMessageReq) Unmarshal(dAtA []byte) error
- func (m *SendMessageReq) XXX_DiscardUnknown()
- func (m *SendMessageReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SendMessageReq) XXX_Merge(src proto.Message)
- func (m *SendMessageReq) XXX_Size() int
- func (m *SendMessageReq) XXX_Unmarshal(b []byte) error
- type SendMessageRsp
- func (*SendMessageRsp) Descriptor() ([]byte, []int)
- func (m *SendMessageRsp) GetMessage() string
- func (m *SendMessageRsp) Marshal() (dAtA []byte, err error)
- func (m *SendMessageRsp) MarshalTo(dAtA []byte) (int, error)
- func (m *SendMessageRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SendMessageRsp) ProtoMessage()
- func (m *SendMessageRsp) Reset()
- func (m *SendMessageRsp) Size() (n int)
- func (m *SendMessageRsp) String() string
- func (m *SendMessageRsp) Unmarshal(dAtA []byte) error
- func (m *SendMessageRsp) XXX_DiscardUnknown()
- func (m *SendMessageRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SendMessageRsp) XXX_Merge(src proto.Message)
- func (m *SendMessageRsp) XXX_Size() int
- func (m *SendMessageRsp) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterImServer ¶
Types ¶
type ConnectReq ¶
type ConnectReq struct {
UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"`
}
ConnectReq is like handshake
func (*ConnectReq) Descriptor ¶
func (*ConnectReq) Descriptor() ([]byte, []int)
func (*ConnectReq) GetUserName ¶
func (m *ConnectReq) GetUserName() string
func (*ConnectReq) Marshal ¶
func (m *ConnectReq) Marshal() (dAtA []byte, err error)
func (*ConnectReq) MarshalToSizedBuffer ¶
func (m *ConnectReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ConnectReq) ProtoMessage ¶
func (*ConnectReq) ProtoMessage()
func (*ConnectReq) Reset ¶
func (m *ConnectReq) Reset()
func (*ConnectReq) Size ¶
func (m *ConnectReq) Size() (n int)
func (*ConnectReq) String ¶
func (m *ConnectReq) String() string
func (*ConnectReq) Unmarshal ¶
func (m *ConnectReq) Unmarshal(dAtA []byte) error
func (*ConnectReq) XXX_DiscardUnknown ¶
func (m *ConnectReq) XXX_DiscardUnknown()
func (*ConnectReq) XXX_Marshal ¶
func (m *ConnectReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConnectReq) XXX_Merge ¶
func (m *ConnectReq) XXX_Merge(src proto.Message)
func (*ConnectReq) XXX_Size ¶
func (m *ConnectReq) XXX_Size() int
func (*ConnectReq) XXX_Unmarshal ¶
func (m *ConnectReq) XXX_Unmarshal(b []byte) error
type ConnectRsp ¶
type ConnectRsp struct {
IsConnect bool `protobuf:"varint,1,opt,name=is_connect,json=isConnect,proto3" json:"is_connect,omitempty"`
}
func (*ConnectRsp) Descriptor ¶
func (*ConnectRsp) Descriptor() ([]byte, []int)
func (*ConnectRsp) GetIsConnect ¶
func (m *ConnectRsp) GetIsConnect() bool
func (*ConnectRsp) Marshal ¶
func (m *ConnectRsp) Marshal() (dAtA []byte, err error)
func (*ConnectRsp) MarshalToSizedBuffer ¶
func (m *ConnectRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ConnectRsp) ProtoMessage ¶
func (*ConnectRsp) ProtoMessage()
func (*ConnectRsp) Reset ¶
func (m *ConnectRsp) Reset()
func (*ConnectRsp) Size ¶
func (m *ConnectRsp) Size() (n int)
func (*ConnectRsp) String ¶
func (m *ConnectRsp) String() string
func (*ConnectRsp) Unmarshal ¶
func (m *ConnectRsp) Unmarshal(dAtA []byte) error
func (*ConnectRsp) XXX_DiscardUnknown ¶
func (m *ConnectRsp) XXX_DiscardUnknown()
func (*ConnectRsp) XXX_Marshal ¶
func (m *ConnectRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConnectRsp) XXX_Merge ¶
func (m *ConnectRsp) XXX_Merge(src proto.Message)
func (*ConnectRsp) XXX_Size ¶
func (m *ConnectRsp) XXX_Size() int
func (*ConnectRsp) XXX_Unmarshal ¶
func (m *ConnectRsp) XXX_Unmarshal(b []byte) error
type CountReq ¶
type CountReq struct {
Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
}
CountReq is for count online member
func (*CountReq) Descriptor ¶
func (*CountReq) MarshalToSizedBuffer ¶
func (*CountReq) ProtoMessage ¶
func (*CountReq) ProtoMessage()
func (*CountReq) XXX_DiscardUnknown ¶
func (m *CountReq) XXX_DiscardUnknown()
func (*CountReq) XXX_Marshal ¶
func (*CountReq) XXX_Unmarshal ¶
type CountRsp ¶
type CountRsp struct {
Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
}
func (*CountRsp) Descriptor ¶
func (*CountRsp) MarshalToSizedBuffer ¶
func (*CountRsp) ProtoMessage ¶
func (*CountRsp) ProtoMessage()
func (*CountRsp) XXX_DiscardUnknown ¶
func (m *CountRsp) XXX_DiscardUnknown()
func (*CountRsp) XXX_Marshal ¶
func (*CountRsp) XXX_Unmarshal ¶
type ImClient ¶
type ImClient interface { // Connect server for wait message Connect(c *context.Context, req *ConnectReq, opts ...roc.InvokeOptions) (*ConnectRsp, error) // Count online member Count(c *context.Context, req *CountReq, opts ...roc.InvokeOptions) (*CountRsp, error) // SendMessage is the im kernel SendMessage(c *context.Context, req chan *SendMessageReq, errIn chan error, opts ...roc.InvokeOptions) (chan *SendMessageRsp, chan error) }
func NewImClient ¶
type ImServer ¶
type ImServer interface { // Connect server for wait message Connect(c *context.Context, req *ConnectReq) (rsp *ConnectRsp, err error) // Count online member Count(c *context.Context, req *CountReq) (rsp *CountRsp, err error) // SendMessage is the im kernel SendMessage(c *context.Context, req chan *SendMessageReq, errIn chan error) (chan *SendMessageRsp, chan error) }
ImServer is the server API for Im service.
type SendMessageReq ¶
type SendMessageReq struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
}
SendMessageReq send a message
func (*SendMessageReq) Descriptor ¶
func (*SendMessageReq) Descriptor() ([]byte, []int)
func (*SendMessageReq) GetMessage ¶
func (m *SendMessageReq) GetMessage() string
func (*SendMessageReq) Marshal ¶
func (m *SendMessageReq) Marshal() (dAtA []byte, err error)
func (*SendMessageReq) MarshalToSizedBuffer ¶
func (m *SendMessageReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SendMessageReq) ProtoMessage ¶
func (*SendMessageReq) ProtoMessage()
func (*SendMessageReq) Reset ¶
func (m *SendMessageReq) Reset()
func (*SendMessageReq) Size ¶
func (m *SendMessageReq) Size() (n int)
func (*SendMessageReq) String ¶
func (m *SendMessageReq) String() string
func (*SendMessageReq) Unmarshal ¶
func (m *SendMessageReq) Unmarshal(dAtA []byte) error
func (*SendMessageReq) XXX_DiscardUnknown ¶
func (m *SendMessageReq) XXX_DiscardUnknown()
func (*SendMessageReq) XXX_Marshal ¶
func (m *SendMessageReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SendMessageReq) XXX_Merge ¶
func (m *SendMessageReq) XXX_Merge(src proto.Message)
func (*SendMessageReq) XXX_Size ¶
func (m *SendMessageReq) XXX_Size() int
func (*SendMessageReq) XXX_Unmarshal ¶
func (m *SendMessageReq) XXX_Unmarshal(b []byte) error
type SendMessageRsp ¶
type SendMessageRsp struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
}
response content. SendMessageRsp usually use for broadcast
func (*SendMessageRsp) Descriptor ¶
func (*SendMessageRsp) Descriptor() ([]byte, []int)
func (*SendMessageRsp) GetMessage ¶
func (m *SendMessageRsp) GetMessage() string
func (*SendMessageRsp) Marshal ¶
func (m *SendMessageRsp) Marshal() (dAtA []byte, err error)
func (*SendMessageRsp) MarshalToSizedBuffer ¶
func (m *SendMessageRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SendMessageRsp) ProtoMessage ¶
func (*SendMessageRsp) ProtoMessage()
func (*SendMessageRsp) Reset ¶
func (m *SendMessageRsp) Reset()
func (*SendMessageRsp) Size ¶
func (m *SendMessageRsp) Size() (n int)
func (*SendMessageRsp) String ¶
func (m *SendMessageRsp) String() string
func (*SendMessageRsp) Unmarshal ¶
func (m *SendMessageRsp) Unmarshal(dAtA []byte) error
func (*SendMessageRsp) XXX_DiscardUnknown ¶
func (m *SendMessageRsp) XXX_DiscardUnknown()
func (*SendMessageRsp) XXX_Marshal ¶
func (m *SendMessageRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SendMessageRsp) XXX_Merge ¶
func (m *SendMessageRsp) XXX_Merge(src proto.Message)
func (*SendMessageRsp) XXX_Size ¶
func (m *SendMessageRsp) XXX_Size() int
func (*SendMessageRsp) XXX_Unmarshal ¶
func (m *SendMessageRsp) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.