publisher

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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Publish

func Publish(exchange channel.Exchange, data interface{}) error

Publish a message to the given exchange queues

Types

type OnConnected

type OnConnected struct {
	ClientID   string `json:"client_id"`
	ReceivedAt int64  `json:"received_at"`
}

OnConnected structure, when a client just arrived

type OnDisconnected

type OnDisconnected struct {
	ClientID   string `json:"client_id"`
	ReceivedAt int64  `json:"received_at"`
}

OnDisconnected structure, when a client disconnected or connection has been lost to it

type OnMessage

type OnMessage struct {
	ClientID       string `json:"client_id"`
	ReceivedAt     int64  `json:"received_at"`
	LastReceivedAt int64  `json:"last_received_at"`
	Size           int    `json:"size"`
	Data           []byte `json:"data"`
}

OnMessage structure, when a new messages arrives

Jump to

Keyboard shortcuts

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