event

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultEventQueue = "event_queue"

Variables

View Source
var ProviderSet = wire.NewSet(NewBus)

Functions

func CreateNats

func CreateNats(id string) (*nats.Conn, error)

Types

type Bus

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

func NewBus

func NewBus(nc *nats.Conn) *Bus

func (*Bus) Publish

func (b *Bus) Publish(subject Subject, message interface{}) error

func (*Bus) Subscribe

func (b *Bus) Subscribe(subject Subject, fn nats.MsgHandler) error

type Subject

type Subject string
const (
	EchoSubject        Subject = "echo"
	ChangeExpSubject   Subject = "change_exp"
	ChangeAttrSubject  Subject = "change_attr"
	SendMessageSubject Subject = "send_message"
	RunWorkflowSubject Subject = "run_workflow"
)

Jump to

Keyboard shortcuts

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