events

package
v0.0.0-...-4ff583b Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DISC_DATA_KEY_CALLBACK_URI = "disc-data-callback-url"
)

Variables

View Source
var CreateRecordEventQueue string = "events-create-record"
View Source
var NotifyCallbackQueue string = "events-notify-callback"

Functions

This section is empty.

Types

type EventHub

type EventHub struct {
	Client *nats.Conn
	Subs   map[string]*nats.Subscription
}

func CreateEventHub

func CreateEventHub(natsUrl string) (*EventHub, error)

func (*EventHub) DecodeEventMessage

func (eh *EventHub) DecodeEventMessage(encodedMessage []byte) *events.Event

func (*EventHub) EncodeEventMessage

func (eh *EventHub) EncodeEventMessage(eventMessage events.Event) []byte

func (*EventHub) Publish

func (eh *EventHub) Publish(queueName string, messageBody []byte) error

func (*EventHub) RaiseCreateRecordEvent

func (eh *EventHub) RaiseCreateRecordEvent(recordId string)

func (*EventHub) RaiseNotifyCallbackEvent

func (eh *EventHub) RaiseNotifyCallbackEvent(schemaUrl string, recordId string, protocol string, protocolVersion string, callbackUrl string)

func (*EventHub) Subscribe

func (eh *EventHub) Subscribe(queueName string) chan *nats.Msg

func (*EventHub) Unsubscribe

func (eh *EventHub) Unsubscribe(queueName string) error

Jump to

Keyboard shortcuts

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