eventmanager

package module
v0.0.0-...-31d72ed Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: MIT Imports: 5 Imported by: 0

README

Auttaja Events Manager

A super simple wrapper around NATS to enforce the CloudEvents message structure.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventHandler

type EventHandler func(m *cloudevents.Event)

type EventManager

type EventManager struct {
	Broker *nats.Conn
	// contains filtered or unexported fields
}

func New

func New(natsAddr string, app string) (*EventManager, error)

func (*EventManager) Listen

func (m *EventManager) Listen(subject string, cb EventHandler) error

func (*EventManager) Publish

func (m *EventManager) Publish(subject, t string, data interface{}) error

Jump to

Keyboard shortcuts

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