Documentation
¶
Index ¶
Constants ¶
View Source
const ( MetricEnqueuedTotal = "enqueued_total" MetricSentTotal = "sent_total" MetricFailedTotal = "failed_total" LabelEvent = "event" LabelDeliveryType = "delivery_type" LabelReason = "reason" DeliveryTypePush = "push" DeliveryTypeSSE = "sse" DeliveryTypeUnknown = "unknown" FailureReasonQueueFull = "queue_full" FailureReasonProviderFailed = "provider_failed" )
Metric constants
Variables ¶
View Source
var Module = fx.Module( "events", fx.Decorate(func(log *zap.Logger) *zap.Logger { return log.Named("events") }), fx.Provide(newMetrics, fx.Private), fx.Provide(NewService), fx.Invoke(func(lc fx.Lifecycle, svc *Service) { ctx, cancel := context.WithCancel(context.Background()) lc.Append(fx.Hook{ OnStart: func(_ context.Context) error { go svc.Run(ctx) return nil }, OnStop: func(_ context.Context) error { cancel() return nil }, }) }), )
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
func NewEvent ¶
func NewEvent(eventType smsgateway.PushEventType, data map[string]string) *Event
func NewMessageEnqueuedEvent ¶
func NewMessageEnqueuedEvent() *Event
func NewSettingsUpdatedEvent ¶
func NewSettingsUpdatedEvent() *Event
func NewWebhooksUpdatedEvent ¶
func NewWebhooksUpdatedEvent() *Event
Click to show internal directories.
Click to hide internal directories.