svc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceContext

type ServiceContext struct {
	Config   config.Config
	Repo     dao.LogicRepository
	Apps     map[string]auth.Auth
	Producer *xkafka.Producer
	CometRPC cometclient.Comet
}

func NewServiceContext

func NewServiceContext(c config.Config) *ServiceContext

func (*ServiceContext) CometGid

func (s *ServiceContext) CometGid(appId string, gid string) string

func (*ServiceContext) CometGroupsID

func (s *ServiceContext) CometGroupsID(appId string, groups []string) []string

func (*ServiceContext) KeysWithServers

func (s *ServiceContext) KeysWithServers(ctx context.Context, keys []string) (map[string][]string, error)

func (*ServiceContext) KeysWithServersByMid

func (s *ServiceContext) KeysWithServersByMid(ctx context.Context, appId string, mid []string) (map[string][]string, error)

func (*ServiceContext) PublishMsg

func (s *ServiceContext) PublishMsg(ctx context.Context, appId string, fromId string, op protocol.Op, key string, msg []byte) (err error)

PublishMsg push a message to MQ.

Jump to

Keyboard shortcuts

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