Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertEvent ¶
type AlertService ¶
type AlertService struct {
// contains filtered or unexported fields
}
func NewAlertService ¶
func NewAlertService( alertConfig *config.AlertConfig, db *pgxpool.Pool, pluginRepo PluginConfigGetter, redisCache PluginCacheClient, alertChan chan AlertEvent, logger *zerolog.Logger, ) *AlertService
func (*AlertService) Start ¶
func (s *AlertService) Start()
func (*AlertService) WorkerClosingWait ¶
func (s *AlertService) WorkerClosingWait()
type PluginCacheClient ¶ added in v0.1.9
type PluginCacheClient interface {
GetCachedResendConfig(ctx context.Context, teamID uuid.UUID) (ResendEmailConfig, bool)
SetCachedResendConfig(ctx context.Context, teamID uuid.UUID, cfg ResendEmailConfig, ttl time.Duration) error
GetCachedZendutyConfig(ctx context.Context, teamID uuid.UUID) (ZendutyConfig, bool)
SetCachedZendutyConfig(ctx context.Context, teamID uuid.UUID, cfg ZendutyConfig, ttl time.Duration) error
}
PluginCacheClient is satisfied by *redis.Client.
type PluginConfigGetter ¶ added in v0.1.9
type PluginConfigGetter interface {
GetResendConfig(ctx context.Context, teamID uuid.UUID) (ResendEmailConfig, bool, error)
GetZendutyConfig(ctx context.Context, teamID uuid.UUID) (ZendutyConfig, bool, error)
}
PluginConfigGetter is satisfied by *plugin.Repository. Defined here to avoid importing the plugin package from alert.
type ResendEmailConfig ¶ added in v0.1.9
ResendEmailConfig holds only what the alert service needs from a Resend plugin.
type ZendutyConfig ¶ added in v0.1.9
type ZendutyConfig struct {
IntegrationURL string `json:"integration_url"`
}
ZendutyConfig holds what the alert service needs from a Zenduty plugin.
Click to show internal directories.
Click to hide internal directories.