msgconfig

package
v3.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2026 License: AGPL-3.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// ProviderRedis is used to refer to redis.
	ProviderRedis provider = "redis"
	// ProviderSQS is used to refer to sqs.
	ProviderSQS provider = "sqs"
	// ProviderPubSub is used to refer to GCP Pub/Sub.
	ProviderPubSub provider = "pubsub"
)

Variables

View Source
var (
	ErrNilConfig = errors.New("nil config provided")
)

Functions

func ProvideConsumerProvider

func ProvideConsumerProvider(ctx context.Context, logger logging.Logger, tracerProvider tracing.TracerProvider, c *Config) (messagequeue.ConsumerProvider, error)

ProvideConsumerProvider provides a ConsumerProvider.

func ProvidePublisherProvider

func ProvidePublisherProvider(ctx context.Context, logger logging.Logger, tracerProvider tracing.TracerProvider, c *Config) (messagequeue.PublisherProvider, error)

ProvidePublisherProvider provides a PublisherProvider.

func RegisterMessageQueue

func RegisterMessageQueue(i do.Injector)

RegisterMessageQueue registers both messagequeue.ConsumerProvider and messagequeue.PublisherProvider with the injector.

Types

type Config

type Config struct {
	Consumer  MessageQueueConfig `envPrefix:"CONSUMER_"  json:"consumers"`
	Publisher MessageQueueConfig `envPrefix:"PUBLISHER_" json:"publishers"`
	// contains filtered or unexported fields
}

Config is used to indicate how the messaging provider should be configured.

type MessageQueueConfig

type MessageQueueConfig struct {
	Provider provider      `env:"PROVIDER"      json:"provider,omitempty"`
	SQS      sqs.Config    `envPrefix:"SQS_"    json:"sqs"`
	PubSub   pubsub.Config `envPrefix:"PUBSUB_" json:"pubSub"`
	Redis    redis.Config  `envPrefix:"REDIS_"  json:"redis"`
	// contains filtered or unexported fields
}

MessageQueueConfig is used to indicate how the messaging provider should be configured.

type QueuesConfig

type QueuesConfig struct {
	DataChangesTopicName              string `env:"DATA_CHANGES_TOPIC_NAME"               json:"dataChangesTopicName"`
	OutboundEmailsTopicName           string `env:"OUTBOUND_EMAILS_TOPIC_NAME"            json:"outboundEmailsTopicName"`
	SearchIndexRequestsTopicName      string `env:"SEARCH_INDEX_REQUESTS_TOPIC_NAME"      json:"searchIndexRequestsTopicName"`
	MobileNotificationsTopicName      string `env:"MOBILE_NOTIFICATIONS_TOPIC_NAME"       json:"mobileNotificationsTopicName"`
	UserDataAggregationTopicName      string `env:"USER_DATA_AGGREGATION_TOPIC_NAME"      json:"userDataAggregationTopicName"`
	WebhookExecutionRequestsTopicName string `env:"WEBHOOK_EXECUTION_REQUESTS_TOPIC_NAME" json:"webhookExecutionRequestsTopicName"`
	// contains filtered or unexported fields
}

QueuesConfig contains the various queue names.

func (*QueuesConfig) ValidateWithContext

func (c *QueuesConfig) ValidateWithContext(ctx context.Context) error

ValidateWithContext validates a QueuesConfig struct.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL