public

package
v0.0.0-...-8a99b67 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChatService = fx.Provide(
	func(
		l *zap.Logger,
		setting cfx.ChatSettingParams,
		mqParams mfx.MessageQueueParams,
		aParams mfx2.AppParams,
		redisParams ofx.RedisParams,
	) (out sfx.GrpcServiceResult, err error) {
		if s, err := NewService(
			l,
			mqParams.MessageQueue,
			setting.ChatInterval,
			aParams.Deployment,
			aParams.AppId,
			db.OpenDatabase(l, redisParams.Redis),
		); err != nil {
			return out, err
		} else {
			out.GrpcService = s
		}
		return
	},
)

Functions

This section is empty.

Types

type Chatter

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

func CreateChatter

func CreateChatter(
	uid string,
	deployment string,
	appId string,
	conn pb.ChatService_ChatServer,
	logger *zap.Logger,
	mq miface.MessageQueue,
	intervalMax time.Duration,
	db *db.Database,
) *Chatter

func (*Chatter) Destroy

func (c *Chatter) Destroy()

func (*Chatter) Init

func (c *Chatter) Init()

func (*Chatter) Update

func (c *Chatter) Update()

type Service

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

func NewService

func NewService(
	l *zap.Logger,
	mq miface.MessageQueue,
	chatInterval int,
	deployment string,
	appId string,
	db *db.Database,
) (result *Service, err error)

func (*Service) Chat

func (s *Service) Chat(server pb.ChatService_ChatServer) error

func (*Service) RegisterWithGrpcServer

func (s *Service) RegisterWithGrpcServer(server siface.IGrpcServer) error

Jump to

Keyboard shortcuts

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