server

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MemberOfflineErr = errors.New("member offline")
)

Functions

This section is empty.

Types

type Broker

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

func (*Broker) Broadcast

func (b *Broker) Broadcast(req *pb.BroadcastReq) (err error)

func (*Broker) BroadcastRoom

func (b *Broker) BroadcastRoom(req *pb.BroadcastRoomReq) (err error)

func (*Broker) Push

func (b *Broker) Push(msg *protocol.TransMessage)

type ConsumerGroupHandler

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

func (*ConsumerGroupHandler) Cleanup

func (*ConsumerGroupHandler) ConsumeClaim

func (*ConsumerGroupHandler) Setup

type MessageSender

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

func NewMessageSender

func NewMessageSender(c *conf.Config, etcdClient *clientv3.Client) *MessageSender

func (*MessageSender) Init

func (s *MessageSender) Init()

type Server

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

func New

func New(c *conf.Config, sender *MessageSender, repo data.DispatcherRepo) *Server

func (*Server) HandlePush

func (s *Server) HandlePush(ctx context.Context, receiverId uint64, dm *protocol.DispatcherMessage) (err error)

func (*Server) Run

func (s *Server) Run()

Jump to

Keyboard shortcuts

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