consumer

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Consume

func Consume(s *server.Server)

Consume back-end queues (Disconnect & Messages)

func GetConsumeChannel

func GetConsumeChannel(exchange channel.Exchange) <-chan amqp.Delivery

GetConsumeChannel gets the go's channel which relays rabbitmq events from a specific exchange

Types

type SendDisconnect

type SendDisconnect struct {
	ClientID string `json:"client_id"`
	Reason   string `json:"reason,omitempty"`
}

SendDisconnect structure, when back-end notifies us to disconnect a client

type SendMessage

type SendMessage struct {
	Data       []byte   `json:"data"`
	Recipients []string `json:"recipients,omitempty"`
}

SendMessage structure, when back-end notifies us to send a message to one, multiple or all clients empty recipients means broadcast

Jump to

Keyboard shortcuts

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