config

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// PubSubSystem selects the backing message infrastructure. Supported values:
	// "kafka", "rabbitmq", or "aws" (SNS/SQS).
	PubSubSystem string

	// Kafka configuration.
	KafkaBrokers       []string
	KafkaClientID      string
	KafkaConsumerGroup string

	// RabbitMQ configuration.
	RabbitMQURL string

	// NATS configuration.
	NATSURL string

	// HTTP configuration.
	HTTPServerAddress string
	// HTTPPublisherURL is the base URL where messages will be sent.
	HTTPPublisherURL string

	// I/O configuration.
	// IOFile is the path to the file used for persistence.
	IOFile string

	// PoisonQueue receives messages that cannot be processed even after retries.
	PoisonQueue string

	// AWS (SNS/SQS) configuration.
	AWSRegion          string
	AWSAccountID       string
	AWSAccessKeyID     string
	AWSSecretAccessKey string
	// AWSEndpoint optionally points to a custom endpoint (for example, LocalStack
	// in local development).
	AWSEndpoint string

	// RetryMiddleware tuning. Zero values fall back to library defaults.
	RetryMaxRetries      int
	RetryInitialInterval time.Duration
	RetryMaxInterval     time.Duration

	// Metrics configuration.
	MetricsEnabled bool
	// MetricsPort is the port where Prometheus metrics will be exposed.
	MetricsPort int

	// WebUI configuration.
	WebUIEnabled bool
	// WebUIPort is the port where the WebUI API will be exposed. Defaults to 8081.
	WebUIPort int
}

Config groups the Pub/Sub settings required to initialise the Service. Each transport only uses the keys that are relevant to it.

func (Config) String added in v0.3.2

func (c Config) String() string

Jump to

Keyboard shortcuts

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