eventmanager

package
v0.0.0-...-834ce46 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventNameWriteKeyGenerated = "manager.write_key.generated"
	EventNameUserCreated       = "manager.user.created"
	EventNameProjectCreated    = "manager.project.created"
	EventNameTaskCreated       = "destination.task.created"
)

event name pattern : PublisherServiceName.EntityName.Trigger.

Variables

This section is empty.

Functions

Types

type CreateChannelFunc

type CreateChannelFunc func(channelName string) error

func NewCreateChannelFunc

func NewCreateChannelFunc(ca channel.Adapter, mod channel.Mode, bufferSize, maxRetryPolicy int) CreateChannelFunc

type EventMessage

type EventMessage struct {
	Event *internalevent.Event
	Ack   func() error
}

func NewEventMessage

func NewEventMessage(ev *internalevent.Event, ack func() error) EventMessage

type Manager

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

func New

func New(wg *sync.WaitGroup, done <-chan bool, adapter channel.Adapter, events map[internalevent.EventName]CreateChannelFunc) (Manager, error)

func (Manager) Consume

func (h Manager) Consume(eventTypes ...internalevent.EventName) (<-chan EventMessage, error)

func (Manager) Publish

func (h Manager) Publish(msg *internalevent.Event) error

type RegisterEventChannel

type RegisterEventChannel func(channelName string) error

Jump to

Keyboard shortcuts

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