eventutil

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 event listeners.

func New

func New(e *gin.Engine) *Engine

New creates the new event listener engine.

func (*Engine) Capture

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

Capture subscribes to a specified stream and capturing the incoming events.

type Listener

type Listener struct {
	Method  string
	Path    string
	Stream  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