job

package
v0.0.0-...-d9ad550 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 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 Comet

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

Comet is a comet.

func NewComet

func NewComet(c *conf.Comet, addr string) *Comet

NewComet new a comet.

func (*Comet) Broadcast

func (c *Comet) Broadcast(arg *pb.BroadcastReq) (err error)

Broadcast broadcast a message.

func (*Comet) BroadcastRoom

func (c *Comet) BroadcastRoom(arg *pb.BroadcastRoomReq) (err error)

BroadcastRoom broadcast a room message.

func (*Comet) Close

func (c *Comet) Close()

Close close the resouces.

func (*Comet) GetRooms

func (c *Comet) GetRooms() map[string]bool

func (*Comet) Push

func (c *Comet) Push(arg *pb.PushMsgReq) (err error)

Push push a user message.

type Comets

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

func InitComets

func InitComets(c *conf.Comet) *Comets

func (*Comets) Broadcast

func (this *Comets) Broadcast(args *pb.BroadcastReq)

broadcast a message to all

func (*Comets) BroadcastRoom

func (this *Comets) BroadcastRoom(roomId string, args *pb.BroadcastRoomReq)

broadcast aggregation messages to room

func (*Comets) Close

func (this *Comets) Close()

func (*Comets) MergeRoomServers

func (this *Comets) MergeRoomServers()

func (*Comets) Push

func (this *Comets) Push(serverId string, args *pb.PushMsgReq)

push a message to a batch of subkeys

func (*Comets) SyncComets

func (this *Comets) SyncComets(c *conf.Comet)

func (*Comets) SyncRoomServers

func (this *Comets) SyncRoomServers()

type Job

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

Job is push job.

func New

func New(c *conf.Config) *Job

New new a push job.

func (*Job) Close

func (j *Job) Close()

Close close resounces.

func (*Job) Consume

func (j *Job) Consume()

Consume messages, watch signals

Directories

Path Synopsis
g

Jump to

Keyboard shortcuts

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