mqutil

package
v0.0.0-...-840a1b4 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2017 License: MIT Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	Gin       *gin.Engine
	Listeners []Listener
}

Engine stores the Gin engine and the message queue listeners.

func New

func New(e *gin.Engine) *Engine

New creates the new message queue handler engine.

func (*Engine) Capture

func (e *Engine) Capture(channel, topic string, handler gin.HandlerFunc)

Capture subscribes to a channel and capturing the incoming messages with the specified topic.

type Listener

type Listener struct {
	Method  string
	Path    string
	Channel string
	Topic   string
	Handler gin.HandlerFunc
}

Listener listens and processes the specified incoming messages.

Jump to

Keyboard shortcuts

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