service

package
v0.1.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: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker struct {
}

func (*Checker) CheckFrame

func (c *Checker) CheckFrame(frame imparse.Frame) error

type DB

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

func (*DB) AddMsg

func (d *DB) AddMsg(ctx context.Context, uid string, m *imparse.MsgIndex) error

func (*DB) GetFilters

func (d *DB) GetFilters() map[imparse.FrameType][]imparse.Filter

func (*DB) GetMid

func (d *DB) GetMid(ctx context.Context) (id int64, err error)

func (*DB) GetMsg

func (d *DB) GetMsg(ctx context.Context, from, msgId string) (*imparse.MsgIndex, error)

type Exec

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

send msg callback

func (*Exec) RevAck

func (e *Exec) RevAck(ctx context.Context, id int64, keys []string, data []byte) error

func (*Exec) Transport

func (e *Exec) Transport(ctx context.Context, mid int64, key, from, target string, ch imparse.Channel, frameType imparse.FrameType, data []byte) error

type Service

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

func New

func New(c *config.Config) *Service

func (*Service) DealOpSendMsg

func (s *Service) DealOpSendMsg(ctx context.Context, m *logic.BizMsg) error

func (*Service) InnerPush

func (s *Service) InnerPush(ctx context.Context, key, from, target string, pushType imparse.Channel, body []byte) (int64, error)

gRPC调用的内部推送通道,不经过check

func (*Service) ListenMQ

func (s *Service) ListenMQ()

func (*Service) Push

func (s *Service) Push(ctx context.Context, key, from string, body []byte) (int64, uint64, error)

func (*Service) Shutdown

func (s *Service) Shutdown(ctx context.Context)

type Trace

type Trace struct {
}

func (*Trace) StartSpanFromContext

func (t *Trace) StartSpanFromContext(ctx context.Context, funcName string) (func(), context.Context)

Jump to

Keyboard shortcuts

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