Documentation
¶
Index ¶
- Variables
- func DefaultAWSSQSDLQName(topic string) string
- func DefaultGCPPubSubDLQSubscriptionName(dlqTopicID string) string
- func DefaultGCPPubSubDLQTopicName(topicID string) string
- func DefaultNATSDLQName(subject string) string
- func DefaultNATSDLQStreamName(dlqSubject string) string
- func DefaultRabbitMQDLQName(queue string) string
- type AWSSQSInfraConfig
- type AzureServiceBusInfraConfig
- type GCPPubSubInfraConfig
- type MQInfra
- type MQInfraConfig
- type NATSInfraConfig
- type Policy
- type RabbitMQInfraConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidConfig = fmt.Errorf("invalid config") ErrInfraUnimplemented = fmt.Errorf("unimplemented infra") )
Functions ¶
func DefaultAWSSQSDLQName ¶ added in v1.2.0
func DefaultGCPPubSubDLQSubscriptionName ¶ added in v1.2.0
func DefaultGCPPubSubDLQTopicName ¶ added in v1.2.0
func DefaultNATSDLQName ¶ added in v1.6.0
DefaultNATSDLQName must not nest under the main stream's subject namespace (e.g. "outpost.>") — a DLQ subject like "outpost.delivery.dlq" would overlap with that wildcard, and JetStream forbids two streams from claiming overlapping subjects. Using an unrelated "dlq." prefix keeps the DLQ stream's subject space entirely separate.
func DefaultNATSDLQStreamName ¶ added in v1.6.0
DefaultNATSDLQStreamName derives the DLQ stream's name from its subject — exported so callers that need to subscribe directly to the DLQ (e.g. tests verifying an exhausted message actually lands there) can name it the same way Declare does, without duplicating the sanitization rule.
func DefaultRabbitMQDLQName ¶ added in v1.2.0
Types ¶
type AWSSQSInfraConfig ¶ added in v0.3.0
type AzureServiceBusInfraConfig ¶ added in v0.3.0
type GCPPubSubInfraConfig ¶ added in v0.3.0
type GCPPubSubInfraConfig struct {
ProjectID string
TopicID string
SubscriptionID string
DLQTopicID string // optional
DLQSubscriptionID string // optional
ServiceAccountCredentials string
MinRetryBackoff int // seconds, for PubSub RetryPolicy (default: 10)
MaxRetryBackoff int // seconds, for PubSub RetryPolicy (default: 600)
}
type MQInfra ¶
type MQInfra interface {
Exist(ctx context.Context) (bool, error)
Declare(ctx context.Context) error
TearDown(ctx context.Context) error
}
func New ¶
func New(cfg *MQInfraConfig) MQInfra
type MQInfraConfig ¶ added in v0.3.0
type MQInfraConfig struct {
AWSSQS *AWSSQSInfraConfig
AzureServiceBus *AzureServiceBusInfraConfig
GCPPubSub *GCPPubSubInfraConfig
RabbitMQ *RabbitMQInfraConfig
NATS *NATSInfraConfig
Policy Policy
}
type NATSInfraConfig ¶ added in v1.6.0
Click to show internal directories.
Click to hide internal directories.