Documentation ¶
Index ¶
- type DatabaseNotificationStore
- func (d *DatabaseNotificationStore) AddNotification(ctx context.Context, notification model.Notification) error
- func (d *DatabaseNotificationStore) GetAllPendingNotifications(ctx context.Context) (map[string][]model.Notification, error)
- func (d *DatabaseNotificationStore) GetNotifications(ctx context.Context, collectionID string) ([]model.Notification, error)
- func (d *DatabaseNotificationStore) RemoveNotifications(ctx context.Context, notification []model.Notification) error
- type MemoryNotificationStore
- func (m *MemoryNotificationStore) AddNotification(ctx context.Context, notification model.Notification) error
- func (m *MemoryNotificationStore) GetAllPendingNotifications(ctx context.Context) (map[string][]model.Notification, error)
- func (m *MemoryNotificationStore) GetNotifications(ctx context.Context, collectionID string) ([]model.Notification, error)
- func (m *MemoryNotificationStore) RemoveNotifications(ctx context.Context, notifications []model.Notification) error
- type MemoryNotifier
- type NotificationProcessor
- type NotificationStore
- type Notifier
- type PulsarNotifier
- type SimpleNotificationProcessor
- type TriggerMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseNotificationStore ¶
type DatabaseNotificationStore struct {
// contains filtered or unexported fields
}
func NewDatabaseNotificationStore ¶
func NewDatabaseNotificationStore(txImpl dbmodel.ITransaction, metaDomain dbmodel.IMetaDomain) *DatabaseNotificationStore
func (*DatabaseNotificationStore) AddNotification ¶
func (d *DatabaseNotificationStore) AddNotification(ctx context.Context, notification model.Notification) error
func (*DatabaseNotificationStore) GetAllPendingNotifications ¶
func (d *DatabaseNotificationStore) GetAllPendingNotifications(ctx context.Context) (map[string][]model.Notification, error)
func (*DatabaseNotificationStore) GetNotifications ¶
func (d *DatabaseNotificationStore) GetNotifications(ctx context.Context, collectionID string) ([]model.Notification, error)
func (*DatabaseNotificationStore) RemoveNotifications ¶
func (d *DatabaseNotificationStore) RemoveNotifications(ctx context.Context, notification []model.Notification) error
type MemoryNotificationStore ¶
type MemoryNotificationStore struct {
// contains filtered or unexported fields
}
func NewMemoryNotificationStore ¶
func NewMemoryNotificationStore() *MemoryNotificationStore
func (*MemoryNotificationStore) AddNotification ¶
func (m *MemoryNotificationStore) AddNotification(ctx context.Context, notification model.Notification) error
func (*MemoryNotificationStore) GetAllPendingNotifications ¶
func (m *MemoryNotificationStore) GetAllPendingNotifications(ctx context.Context) (map[string][]model.Notification, error)
func (*MemoryNotificationStore) GetNotifications ¶
func (m *MemoryNotificationStore) GetNotifications(ctx context.Context, collectionID string) ([]model.Notification, error)
func (*MemoryNotificationStore) RemoveNotifications ¶
func (m *MemoryNotificationStore) RemoveNotifications(ctx context.Context, notifications []model.Notification) error
type MemoryNotifier ¶
type MemoryNotifier struct {
// contains filtered or unexported fields
}
func NewMemoryNotifier ¶
func NewMemoryNotifier() *MemoryNotifier
func (*MemoryNotifier) Notify ¶
func (m *MemoryNotifier) Notify(ctx context.Context, notifications []model.Notification) error
type NotificationProcessor ¶
type NotificationStore ¶
type NotificationStore interface { GetAllPendingNotifications(ctx context.Context) (map[string][]model.Notification, error) GetNotifications(ctx context.Context, collecitonID string) ([]model.Notification, error) AddNotification(ctx context.Context, notification model.Notification) error RemoveNotifications(ctx context.Context, notifications []model.Notification) error }
type Notifier ¶
type Notifier interface {
Notify(ctx context.Context, notifications []model.Notification) error
}
type PulsarNotifier ¶
type PulsarNotifier struct {
// contains filtered or unexported fields
}
func NewPulsarNotifier ¶
func NewPulsarNotifier(producer pulsar.Producer) *PulsarNotifier
func (*PulsarNotifier) Notify ¶
func (p *PulsarNotifier) Notify(ctx context.Context, notifications []model.Notification) error
type SimpleNotificationProcessor ¶
type SimpleNotificationProcessor struct {
// contains filtered or unexported fields
}
func NewSimpleNotificationProcessor ¶
func NewSimpleNotificationProcessor(ctx context.Context, store NotificationStore, notifier Notifier) *SimpleNotificationProcessor
func (*SimpleNotificationProcessor) Process ¶
func (n *SimpleNotificationProcessor) Process(ctx context.Context) error
func (*SimpleNotificationProcessor) Start ¶
func (n *SimpleNotificationProcessor) Start() error
func (*SimpleNotificationProcessor) Stop ¶
func (n *SimpleNotificationProcessor) Stop() error
func (*SimpleNotificationProcessor) Trigger ¶
func (n *SimpleNotificationProcessor) Trigger(ctx context.Context, triggerMsg TriggerMessage)
type TriggerMessage ¶
type TriggerMessage struct { Msg model.Notification ResultChan chan error }
Click to show internal directories.
Click to hide internal directories.