logic

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidAppId = errors.New("ErrInvalidAppId")
View Source
var ErrInvalidAuthReq = errors.New("ErrInvalidAuthReq")

Functions

This section is empty.

Types

type Logic

type Logic struct {
	// contains filtered or unexported fields
}

func New

func New(c *conf.Config) (l *Logic)

func (*Logic) Close

func (l *Logic) Close()

func (*Logic) Connect

func (l *Logic) Connect(c context.Context, server string, p *comet.Proto) (mid string, appId string, key string, hb int64, errMsg string, err error)

Connect connected a conn.

func (*Logic) DelGroups

func (l *Logic) DelGroups(c context.Context, appId string, gids []string) (reply *comet.DelGroupsReply, err error)

DelGroups Push push a biz message to client.

func (*Logic) Disconnect

func (l *Logic) Disconnect(c context.Context, key string, server string) (has bool, err error)

Disconnect disconnect a conn.

func (*Logic) Heartbeat

func (l *Logic) Heartbeat(c context.Context, key string, server string) (err error)

Heartbeat heartbeat a conn.

func (*Logic) JoinGroupsByKeys

func (l *Logic) JoinGroupsByKeys(c context.Context, appId string, keys []string, gids []string) (reply *comet.JoinGroupsReply, err error)

JoinGroupsByKeys Push push a biz message to client.

func (*Logic) JoinGroupsByMids

func (l *Logic) JoinGroupsByMids(c context.Context, appId string, mids []string, gids []string) (reply *comet.JoinGroupsReply, err error)

JoinGroupsByMids Push push a biz message to client.

func (*Logic) LeaveGroupsByKeys

func (l *Logic) LeaveGroupsByKeys(c context.Context, appId string, keys []string, gids []string) (reply *comet.LeaveGroupsReply, err error)

LeaveGroupsByKeys Push push a biz message to client.

func (*Logic) LeaveGroupsByMids

func (l *Logic) LeaveGroupsByMids(c context.Context, appId string, mids []string, gids []string) (reply *comet.LeaveGroupsReply, err error)

LeaveGroupsByMids Push push a biz message to client.

func (*Logic) PushByKeys

func (l *Logic) PushByKeys(c context.Context, appId string, keys []string, msg []byte) (reply *comet.PushMsgReply, err error)

PushByKeys Push push a biz message to client.

func (*Logic) PushByMids

func (l *Logic) PushByMids(c context.Context, appId string, toIds []string, msg []byte) (reply *comet.PushMsgReply, err error)

PushByMids Push push a biz message to client.

func (*Logic) PushGroup

func (l *Logic) PushGroup(c context.Context, appId string, group string, msg []byte) (reply *comet.BroadcastGroupReply, err error)

PushGroup Push push a biz message to client.

func (*Logic) Receive

func (l *Logic) Receive(c context.Context, key string, p *comet.Proto) (err error)

Receive receive a message from client.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL