event

package
v0.0.0-...-0231498 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ls service.LogService) event.Event

func NewEhEvent

func NewEhEvent(ls service.LogService) event.Event

func NewNatsEvent

func NewNatsEvent(ls service.LogService) event.Event

Types

type CommonEventHandler

type CommonEventHandler struct {
	// contains filtered or unexported fields
}

event handler

func NewCommonEventHandler

func NewCommonEventHandler(eventName string, fn interface{}) *CommonEventHandler

func (*CommonEventHandler) HandleEvent

func (h *CommonEventHandler) HandleEvent(ctx context.Context, evt eh.Event) error

func (*CommonEventHandler) HandlerType

func (h *CommonEventHandler) HandlerType() eh.EventHandlerType

type EhEvent

type EhEvent struct {
	Bus        eh.EventBus
	Store      eh.EventStore
	LogService service.LogService
}

func (*EhEvent) Publish

func (e *EhEvent) Publish(eventName string, args ...interface{})

func (*EhEvent) Subscribe

func (e *EhEvent) Subscribe(eventName string, fn interface{})

type Event

type Event struct {
	Bus        eb.Bus
	LogService service.LogService
}

func (*Event) Publish

func (e *Event) Publish(eventName string, args ...interface{})

func (*Event) Subscribe

func (e *Event) Subscribe(eventName string, fn interface{})

type NatsEvent

type NatsEvent struct {
	Bus        *nats.Conn
	LogService service.LogService
}

func (*NatsEvent) Publish

func (e *NatsEvent) Publish(eventName string, args ...interface{})

func (*NatsEvent) Subscribe

func (e *NatsEvent) Subscribe(eventName string, fn interface{})

Jump to

Keyboard shortcuts

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