Implement notifications service with shared messaging and email drivers (#36)
This commit is contained in:
1 parent
36277b6c45
commit
5c2d36281b
54 files changed
+3746
-6
No files matched your search
@@ -0,0 +1,75 @@
|
||||
package reliable
|
||||
|
||||
const DurableSettingsBlockKey = "durable_delivery"
|
||||
|
||||
type DurableTransport string
|
||||
|
||||
const (
|
||||
DurableTransportDirect DurableTransport = "direct"
|
||||
DurableTransportJetStream DurableTransport = "jetstream"
|
||||
)
|
||||
|
||||
type DurableProvisioningMode string
|
||||
|
||||
const (
|
||||
DurableProvisioningHybrid DurableProvisioningMode = "hybrid"
|
||||
DurableProvisioningApp DurableProvisioningMode = "app"
|
||||
DurableProvisioningOps DurableProvisioningMode = "ops"
|
||||
)
|
||||
|
||||
type DurableEnvironment string
|
||||
|
||||
const (
|
||||
DurableEnvironmentNonProduction DurableEnvironment = "non-production"
|
||||
DurableEnvironmentProduction DurableEnvironment = "production"
|
||||
)
|
||||
|
||||
type DurableDeliverPolicy string
|
||||
|
||||
const (
|
||||
DurableDeliverAll DurableDeliverPolicy = "all"
|
||||
DurableDeliverNew DurableDeliverPolicy = "new"
|
||||
)
|
||||
|
||||
type DurablePublisherSettings struct {
|
||||
Transport DurableTransport `mapstructure:"transport" yaml:"transport"`
|
||||
DurableSubjects []string `mapstructure:"durable_subjects" yaml:"durable_subjects"`
|
||||
}
|
||||
|
||||
type DurableStreamSettings struct {
|
||||
Name string `mapstructure:"name" yaml:"name"`
|
||||
Subjects []string `mapstructure:"subjects" yaml:"subjects"`
|
||||
MaxAgeHours int `mapstructure:"max_age_hours" yaml:"max_age_hours"`
|
||||
Storage string `mapstructure:"storage" yaml:"storage"`
|
||||
Replicas int `mapstructure:"replicas" yaml:"replicas"`
|
||||
}
|
||||
|
||||
type DurableParkingSettings struct {
|
||||
StreamName string `mapstructure:"stream_name" yaml:"stream_name"`
|
||||
SubjectPrefix string `mapstructure:"subject_prefix" yaml:"subject_prefix"`
|
||||
MaxOperatorReplays int `mapstructure:"max_operator_replays" yaml:"max_operator_replays"`
|
||||
}
|
||||
|
||||
type DurableProvisioningSettings struct {
|
||||
Mode DurableProvisioningMode `mapstructure:"mode" yaml:"mode"`
|
||||
Environment DurableEnvironment `mapstructure:"environment" yaml:"environment"`
|
||||
}
|
||||
|
||||
type DurableConsumerSettings struct {
|
||||
Subject string `mapstructure:"subject" yaml:"subject"`
|
||||
Durable string `mapstructure:"durable" yaml:"durable"`
|
||||
DeliverPolicy DurableDeliverPolicy `mapstructure:"deliver_policy" yaml:"deliver_policy"`
|
||||
AckWaitSeconds int `mapstructure:"ack_wait_seconds" yaml:"ack_wait_seconds"`
|
||||
MaxDeliver int `mapstructure:"max_deliver" yaml:"max_deliver"`
|
||||
InactiveThresholdSeconds int `mapstructure:"inactive_threshold_seconds" yaml:"inactive_threshold_seconds"`
|
||||
}
|
||||
|
||||
type DurableSettings struct {
|
||||
Enabled bool `mapstructure:"enabled" yaml:"enabled"`
|
||||
Publisher DurablePublisherSettings `mapstructure:"publisher" yaml:"publisher"`
|
||||
Stream DurableStreamSettings `mapstructure:"stream" yaml:"stream"`
|
||||
Parking DurableParkingSettings `mapstructure:"parking" yaml:"parking"`
|
||||
Provisioning DurableProvisioningSettings `mapstructure:"provisioning" yaml:"provisioning"`
|
||||
Consumers []DurableConsumerSettings `mapstructure:"consumers" yaml:"consumers"`
|
||||
ServiceName string `mapstructure:"-" yaml:"-"`
|
||||
}
|
||||
Reference in new issue
Block a user