duey

package module
v0.0.0-...-560a284 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventStreamer

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

func Init

func Init() (*EventStreamer, error)

func (*EventStreamer) Publish

func (s *EventStreamer) Publish(subject string, model interface{}) (err error)

Publish publishes the model argument to the subject queue

func (*EventStreamer) Request

func (s *EventStreamer) Request(subject string, model interface{}, res interface{}, timeout time.Duration) (err error)

Request will request a reply from the subject queue and return the model

func (*EventStreamer) Stop

func (s *EventStreamer) Stop()

func (*EventStreamer) Subscribe

func (s *EventStreamer) Subscribe(subject string, callback Handler) (err error)

Subscribe listens for models sent into the subject queue

type Handler

type Handler interface{}

Jump to

Keyboard shortcuts

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