notifications
package v2.28.4
Go to latest Published: Nov 27, 2025 License:AGPL-3.0
Opens a new window with list of versions in this module.
Latest LatestThis package is not in the latest version of its module.
Opens a new window with license information.
Imports:23 Opens a new window with list of imports.
Imported by:0 Opens a new window with list of known importers.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
Constants¶
View Source
const (WebsocketNotificationReceiptTimeMetric = "notification_websocket_receipt_time"SMTPNotificationReceiptTimeMetric = "notification_smtp_receipt_time")
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeConfig¶
type Config struct {// User is the configuration for the user to create.Usercreateusers.Config `json:"user"`// Roles are the roles to assign to the user.Roles []string `json:"roles"`// NotificationTimeout is how long to wait for notifications after triggering.NotificationTimeouttime.Duration `json:"notification_timeout"`// DialTimeout is how long to wait for websocket connection.DialTimeouttime.Duration `json:"dial_timeout"`// ExpectedNotificationsIDs is the list of notification template IDs to expect.ExpectedNotificationsIDs map[uuid.UUID]struct{} `json:"-"`Metrics *Metrics `json:"-"`// DialBarrier ensures all runners are connected before notifications are triggered.DialBarrier *sync.WaitGroup `json:"-"`// ReceivingWatchBarrier is the barrier for receiving users. Regular users wait on this to disconnect after receiving users complete.ReceivingWatchBarrier *sync.WaitGroup `json:"-"`// SMTPApiUrl is the URL of the SMTP mock HTTP APISMTPApiURLstring `json:"smtp_api_url"`}typeMetrics¶
type Metrics struct {// contains filtered or unexported fields}funcNewMetrics¶
func NewMetrics(regprometheus.Registerer) *Metrics
func (*Metrics)RecordLatency¶
func (m *Metrics) RecordLatency(latencytime.Duration, notificationIDstring, notificationTypeNotificationType)
typeNotificationType¶
type NotificationTypestring
const (NotificationTypeWebsocketNotificationType = "websocket"NotificationTypeSMTPNotificationType = "smtp")
Click to show internal directories.
Click to hide internal directories.