dao

package
v0.96.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

type Dao struct {
	*Mysql

	idgen_client.IDGenClient2
	status_client.StatusClient
	chat_client.ChatClient
	PushClient sync_client.SyncClient
	// contains filtered or unexported fields
}

func New

func New(c config.Config) *Dao

func (*Dao) AddSeqToUpdatesQueue

func (d *Dao) AddSeqToUpdatesQueue(ctx context.Context, authId, userId int64, updateType int32, updateData []byte) int32

func (*Dao) AddToPtsQueue

func (d *Dao) AddToPtsQueue(ctx context.Context, userId int64, pts, ptsCount int32, update *mtproto.Update) int32

func (*Dao) PushRpcResultToSession

func (d *Dao) PushRpcResultToSession(ctx context.Context, serverId string, msg *session.TLSessionPushRpcResultData) (err error)

func (*Dao) PushSessionUpdatesToSession

func (d *Dao) PushSessionUpdatesToSession(ctx context.Context, serverId string, msg *session.TLSessionPushSessionUpdatesData) (err error)

func (*Dao) PushUpdatesToSession

func (d *Dao) PushUpdatesToSession(ctx context.Context, serverId string, msg *session.TLSessionPushUpdatesData) (err error)

type Session

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

Session is a gateway.

func NewSession

func NewSession(c zrpc.RpcClientConf, options SessionOptions) (*Session, error)

NewSession new a comet.

func (*Session) Close

func (c *Session) Close() (err error)

func (*Session) PushRpcResult

func (c *Session) PushRpcResult(ctx context.Context, msg *session.TLSessionPushRpcResultData) (err error)

func (*Session) PushSessionUpdates

func (c *Session) PushSessionUpdates(ctx context.Context, msg *session.TLSessionPushSessionUpdatesData) (err error)

func (*Session) PushUpdates

func (c *Session) PushUpdates(ctx context.Context, msg *session.TLSessionPushUpdatesData) (err error)

type SessionOptions

type SessionOptions struct {
	RoutineSize uint64
	RoutineChan uint64
}

SessionOptions comet options.

Jump to

Keyboard shortcuts

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