pubsub

package
v0.0.0-...-6443788 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleNotifyChat

func HandleNotifyChat(ctx context.Context, log *zap.Logger, ps *PubSub, chat *cc.Chat, eventType cc.EventType)

func HandleNotifyMessage

func HandleNotifyMessage(ctx context.Context, log *zap.Logger, ps *PubSub, msg *cc.Message, chat *cc.Chat, eventType cc.EventType)

func HandleSpecialNotify

func HandleSpecialNotify(ctx context.Context, log *zap.Logger, ps *PubSub, msg *cc.Message, oldMsg *cc.Message, chat *cc.Chat)

Types

type PubSub

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

func NewPubSub

func NewPubSub(logger *zap.Logger, conn *amqp091.Connection) *PubSub

func (*PubSub) Pub

func (s *PubSub) Pub(ctx context.Context, id string, event *cc.Event)

func (*PubSub) PubGateway

func (s *PubSub) PubGateway(ctx context.Context, event *cc.Event, gateways []string)

func (*PubSub) PubWhmcs

func (s *PubSub) PubWhmcs(ctx context.Context, event *cc.Event)

func (*PubSub) Sub

func (s *PubSub) Sub(id string) (<-chan amqp091.Delivery, func() error, error)

Jump to

Keyboard shortcuts

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