Versions in this module Expand all Collapse all v1 v1.2.0 Dec 30, 2014 v1.1.0 Nov 28, 2014 v1.0.0 Nov 4, 2014 Changes in this version + const CometServicePushPrivate + const InternalErr + const MessageService + const MessageServiceDelPrivate + const MessageServiceGetPrivate + const MessageServiceSavePrivate + const OK + const ParamErr + const PrivateGroupId + const PublicGroupId + var ErrCometRPC = errors.New("comet rpc call failed") + var ErrParam = errors.New("parameter error") + var ErrRandLBAddr = errors.New("clients map no addr key") + var ErrRandLBLength = errors.New("clients and addrs length not match") + func InitComet(conn *zk.Conn, fpath string, retry, ping time.Duration) + func InitMessage(conn *zk.Conn, fpath string, retry, ping time.Duration) + type CometMigrateArgs struct + Nodes []string + Vnode int + type CometNewArgs struct + Expire int64 + Key string + Token string + type CometNodeEvent struct + Event int + Key string + Value *CometNodeInfo + type CometNodeInfo struct + Addr map[int][]string + CometRPC *RandLB + func GetComet(key string) *CometNodeInfo + type CometPushPrivateArgs struct + Expire uint + Key string + Msg json.RawMessage + type CometPushPublicArgs struct + Msg string + MsgID int64 + type Message struct + GroupId uint + Msg json.RawMessage + MsgId int64 + func (m *Message) Bytes() ([]byte, error) + func (m *Message) OldBytes() ([]byte, error) + type MessageGetPrivateArgs struct + Key string + MsgId int64 + type MessageGetResp struct + Msgs []*Message + type MessageNodeEvent struct + Event int + Key string + type MessageSavePrivateArgs struct + Expire uint + Key string + Msg json.RawMessage + MsgId int64 + type MessageSavePublishArgs struct + Expire int64 + Msg string + MsgID int64 + type OldMessage struct + GroupId uint + Msg string + MsgId int64 + type RandLB struct + Clients map[string]*rpc.Client + var MessageRPC *RandLB + func NewRandLB(clients map[string]*rpc.Client, addrs []string, service string, ...) (*RandLB, error) + func (r *RandLB) Destroy() + func (r *RandLB) Get() *rpc.Client + func (r *RandLB) Stop()