config

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OTelProtocolGRPC = "grpc"
	OTelProtocolHTTP = "http"
)
View Source
const (
	Namespace = "Outpost"
)

Variables

View Source
var (
	ErrMismatchedServiceType = errors.New("config validation error: service type mismatch")
	ErrInvalidServiceType    = errors.New("config validation error: invalid service type")
	ErrMissingRedis          = errors.New("config validation error: redis configuration is required")
	ErrMissingLogStorage     = errors.New("config validation error: log storage must be provided")
	ErrMissingMQs            = errors.New("config validation error: message queue configuration is required")
	ErrMissingAESSecret      = errors.New("config validation error: AES encryption secret is required")
	ErrInvalidPortalProxyURL = errors.New("config validation error: invalid portal proxy url")
	ErrInvalidDeploymentID   = errors.New("config validation error: deployment_id must contain only alphanumeric characters, hyphens, and underscores (max 64 characters)")
)
View Source
var ErrInvalidOTelProtocol = errors.New("config validation error: invalid OpenTelemetry protocol, must be 'grpc' or 'http'")

Functions

This section is empty.

Types

type AWSSQSConfig

type AWSSQSConfig struct {
	AccessKeyID     string `` /* 142-byte string literal not displayed */
	SecretAccessKey string `` /* 154-byte string literal not displayed */
	Region          string `yaml:"region" env:"AWS_SQS_REGION" desc:"AWS Region for SQS. Required if AWS SQS is the chosen MQ provider." required:"C"`
	Endpoint        string `` /* 150-byte string literal not displayed */
	DeliveryQueue   string `yaml:"delivery_queue" env:"AWS_SQS_DELIVERY_QUEUE" desc:"Name of the SQS queue for delivery events." required:"N"`
	LogQueue        string `yaml:"log_queue" env:"AWS_SQS_LOG_QUEUE" desc:"Name of the SQS queue for log events." required:"N"`
}

func (*AWSSQSConfig) GetProviderType added in v0.3.0

func (c *AWSSQSConfig) GetProviderType() string

func (*AWSSQSConfig) IsConfigured added in v0.3.0

func (c *AWSSQSConfig) IsConfigured() bool

func (*AWSSQSConfig) ToInfraConfig added in v0.3.0

func (c *AWSSQSConfig) ToInfraConfig(queueType string) *mqinfra.MQInfraConfig

func (*AWSSQSConfig) ToQueueConfig added in v0.3.0

func (c *AWSSQSConfig) ToQueueConfig(ctx context.Context, queueType string) (*mqs.QueueConfig, error)

type AlertConfig

type AlertConfig struct {
	ConsecutiveFailureCount       OptionalString `` /* 322-byte string literal not displayed */
	AutoDisableDestination        bool           `` /* 238-byte string literal not displayed */
	ExhaustedRetriesWindowSeconds OptionalString `` /* 399-byte string literal not displayed */
}

func (*AlertConfig) ToConfig added in v1.0.6

func (c *AlertConfig) ToConfig() (alert.Settings, error)

ToConfig resolves the raw alert config into operational alert.Settings. For the two count fields the rule is: unset (nil) uses the built-in default, an empty string disables that alert dimension, and any other value must parse to a non-negative integer. It returns an error on a non-numeric or out-of-range value so Validate can reject it at startup.

type AzureServiceBusConfig added in v0.3.0

type AzureServiceBusConfig struct {
	// Using AzureSB with ConnectionString will skip infra management
	ConnectionString string `yaml:"connection_string" env:"AZURE_SERVICEBUS_CONNECTION_STRING" desc:"Azure Service Bus connection string" required:"N"`

	TenantID       string `yaml:"tenant_id" env:"AZURE_SERVICEBUS_TENANT_ID" desc:"Azure Active Directory tenant ID" required:"Y"`
	ClientID       string `yaml:"client_id" env:"AZURE_SERVICEBUS_CLIENT_ID" desc:"Service principal client ID" required:"Y"`
	ClientSecret   string `yaml:"client_secret" env:"AZURE_SERVICEBUS_CLIENT_SECRET" desc:"Service principal client secret" required:"Y"`
	SubscriptionID string `yaml:"subscription_id" env:"AZURE_SERVICEBUS_SUBSCRIPTION_ID" desc:"Azure subscription ID" required:"Y"`
	ResourceGroup  string `yaml:"resource_group" env:"AZURE_SERVICEBUS_RESOURCE_GROUP" desc:"Azure resource group name" required:"Y"`
	Namespace      string `yaml:"namespace" env:"AZURE_SERVICEBUS_NAMESPACE" desc:"Azure Service Bus namespace" required:"Y"`

	DeliveryTopic        string `` /* 136-byte string literal not displayed */
	DeliverySubscription string `` /* 161-byte string literal not displayed */
	LogTopic             string `yaml:"log_topic" env:"AZURE_SERVICEBUS_LOG_TOPIC" desc:"Topic name for log queue" required:"N" default:"outpost-log"`
	LogSubscription      string `` /* 141-byte string literal not displayed */

}

func (*AzureServiceBusConfig) GetProviderType added in v0.3.0

func (c *AzureServiceBusConfig) GetProviderType() string

func (*AzureServiceBusConfig) IsConfigured added in v0.3.0

func (c *AzureServiceBusConfig) IsConfigured() bool

func (*AzureServiceBusConfig) ToInfraConfig added in v0.3.0

func (c *AzureServiceBusConfig) ToInfraConfig(queueType string) *mqinfra.MQInfraConfig

func (*AzureServiceBusConfig) ToQueueConfig added in v0.3.0

func (c *AzureServiceBusConfig) ToQueueConfig(ctx context.Context, queueType string) (*mqs.QueueConfig, error)

type ClickHouseConfig

type ClickHouseConfig struct {
	Addr       string `` /* 179-byte string literal not displayed */
	Username   string `yaml:"username" env:"CLICKHOUSE_USERNAME" desc:"Username for ClickHouse authentication." required:"N"`
	Password   string `yaml:"password" env:"CLICKHOUSE_PASSWORD" desc:"Password for ClickHouse authentication." required:"N"`
	Database   string `yaml:"database" env:"CLICKHOUSE_DATABASE" desc:"Database name in ClickHouse to use." required:"N"`
	TLSEnabled bool   `yaml:"tls_enabled" env:"CLICKHOUSE_TLS_ENABLED" desc:"Enable TLS for ClickHouse connection." required:"N"`
}

func (*ClickHouseConfig) ToConfig

type Config

type Config struct {
	Service       string              `` /* 175-byte string literal not displayed */
	LogLevel      string              `` /* 153-byte string literal not displayed */
	OpenTelemetry OpenTelemetryConfig `yaml:"otel"`
	Telemetry     TelemetryConfig     `yaml:"telemetry"`

	// API
	APIPort      int    `yaml:"api_port" env:"API_PORT" desc:"Port number for the API server to listen on." required:"N"`
	APIKey       string `yaml:"api_key" env:"API_KEY" desc:"API key for authenticating requests to the Outpost API." required:"Y"`
	APIJWTSecret string `` /* 147-byte string literal not displayed */
	GinMode      string `` /* 149-byte string literal not displayed */

	// Application
	DeploymentID        string   `` /* 206-byte string literal not displayed */
	AESEncryptionSecret string   `` /* 159-byte string literal not displayed */
	Topics              []string `` /* 163-byte string literal not displayed */
	HTTPUserAgent       string   `` /* 170-byte string literal not displayed */

	// Infrastructure
	Redis       RedisConfig      `yaml:"redis"`
	ClickHouse  ClickHouseConfig `yaml:"clickhouse"`
	PostgresURL string           `` /* 173-byte string literal not displayed */
	MQs         *MQsConfig       `yaml:"mqs"`

	// PublishMQ
	PublishMQ PublishMQConfig `yaml:"publishmq"`

	// Consumers
	PublishMaxConcurrency  int `` /* 155-byte string literal not displayed */
	DeliveryMaxConcurrency int `` /* 143-byte string literal not displayed */
	LogMaxConcurrency      int `` /* 138-byte string literal not displayed */

	// Delivery Retry
	RetrySchedule                 []int `` /* 314-byte string literal not displayed */
	RetryIntervalSeconds          int   `` /* 186-byte string literal not displayed */
	RetryMaxLimit                 int   `` /* 182-byte string literal not displayed */
	RetryPollBackoffMs            int   `` /* 457-byte string literal not displayed */
	RetryVisibilityTimeoutSeconds int   `` /* 322-byte string literal not displayed */

	// Event Delivery
	MaxDestinationsPerTenant int `` /* 152-byte string literal not displayed */
	DeliveryTimeoutSeconds   int `` /* 171-byte string literal not displayed */

	// Idempotency
	PublishIdempotencyKeyTTL  int `` /* 255-byte string literal not displayed */
	DeliveryIdempotencyKeyTTL int `` /* 269-byte string literal not displayed */

	// Log batcher configuration
	LogBatchThresholdSeconds int `` /* 190-byte string literal not displayed */
	LogBatchSize             int `` /* 137-byte string literal not displayed */

	DisableTelemetry bool `` /* 218-byte string literal not displayed */

	// Destinations
	Destinations DestinationsConfig `yaml:"destinations"`

	// Portal
	Portal PortalConfig `yaml:"portal"`

	// Alert
	Alert AlertConfig `yaml:"alert"`

	// Operator Events
	OperatorEvents OperatorEventsConfig `yaml:"operator_events"`

	// ID Generation
	IDGen IDGenConfig `yaml:"idgen"`

	// Retention
	ClickHouseLogRetentionTTLDays int `` /* 150-byte string literal not displayed */
	// contains filtered or unexported fields
}

func Parse

func Parse(flags Flags) (*Config, error)

Parse is the main entry point for parsing and validating config

func ParseWithOS

func ParseWithOS(flags Flags, osInterface OSInterface) (*Config, error)

ParseWithOS parses and validates config with a custom OS interface

func ParseWithoutValidation

func ParseWithoutValidation(flags Flags, osInterface OSInterface) (*Config, error)

ParseWithoutValidation parses the config without validation

func (*Config) ConfigFilePath

func (c *Config) ConfigFilePath() string

ConfigFilePath returns the path of the config file that was used

func (*Config) GetPortalConfig

func (c *Config) GetPortalConfig() portal.PortalConfig

GetPortalConfig returns the portal configuration with all necessary fields

func (*Config) GetRetryBackoff added in v0.8.0

func (c *Config) GetRetryBackoff() (backoff.Backoff, int)

GetRetryBackoff returns the configured backoff strategy based on retry configuration

func (*Config) GetService

func (c *Config) GetService() (ServiceType, error)

GetService returns ServiceType with error checking

func (*Config) InitDefaults

func (c *Config) InitDefaults()

func (*Config) LogConfigurationSummary added in v0.9.1

func (c *Config) LogConfigurationSummary() []zap.Field

LogConfigurationSummary returns zap fields with configuration summary, masking sensitive data

⚠️ IMPORTANT: When adding new configuration fields, you MUST update this function to include them in the startup logs. This helps with troubleshooting and ensures configuration visibility.

Guidelines:

  • For non-sensitive fields: use zap.String(), zap.Int(), zap.Bool(), etc.
  • For sensitive fields (secrets, passwords, keys): use zap.Bool("field_configured", value != "")
  • For URLs with credentials: use helper functions like maskURL() or maskPostgresURLHost()

See contributing/config.md for detailed guidelines on configuration logging.

func (*Config) MustGetService

func (c *Config) MustGetService() ServiceType

MustGetService returns ServiceType without error checking - panics if called before validation

func (*Config) ToMigratorOpts

func (c *Config) ToMigratorOpts() migrator.MigrationOpts

func (*Config) ToTelemetryApplicationInfo

func (c *Config) ToTelemetryApplicationInfo() telemetry.ApplicationInfo

func (*Config) Validate

func (c *Config) Validate(flags Flags) error

Validate checks if the configuration is valid

type DestinationAWSKinesisConfig

type DestinationAWSKinesisConfig struct {
	MetadataInPayload bool `` /* 191-byte string literal not displayed */
}

AWS Kinesis configuration

type DestinationWebhookConfig

type DestinationWebhookConfig struct {
	// ProxyURL may contain authentication credentials (e.g., http://user:pass@proxy:8080)
	// and should be treated as sensitive.
	// TODO: Implement sensitive value handling - https://github.com/hookdeck/outpost/issues/480
	Mode                          string `` /* 198-byte string literal not displayed */
	ProxyURL                      string `` /* 259-byte string literal not displayed */
	HeaderPrefix                  string `` /* 275-byte string literal not displayed */
	DisableDefaultEventIDHeader   bool   `` /* 235-byte string literal not displayed */
	DisableDefaultSignatureHeader bool   `` /* 238-byte string literal not displayed */
	DisableDefaultTimestampHeader bool   `` /* 238-byte string literal not displayed */
	DisableDefaultTopicHeader     bool   `` /* 226-byte string literal not displayed */
	SignatureContentTemplate      string `` /* 215-byte string literal not displayed */
	SignatureHeaderTemplate       string `` /* 188-byte string literal not displayed */
	SignatureEncoding             string `` /* 175-byte string literal not displayed */
	SignatureAlgorithm            string `` /* 192-byte string literal not displayed */
	SigningSecretTemplate         string `` /* 356-byte string literal not displayed */
}

Webhook configuration

type DestinationsConfig

type DestinationsConfig struct {
	MetadataPath                string                      `` /* 143-byte string literal not displayed */
	IncludeMillisecondTimestamp bool                        `` /* 237-byte string literal not displayed */
	Webhook                     DestinationWebhookConfig    `yaml:"webhook" desc:"Configuration specific to webhook destinations."`
	AWSKinesis                  DestinationAWSKinesisConfig `yaml:"aws_kinesis" desc:"Configuration specific to AWS Kinesis destinations."`
}

DestinationsConfig is the main configuration for all destination types

func (*DestinationsConfig) ToConfig

type Flags

type Flags struct {
	Service string
	Config  string // Config file path
	Version bool   // Print version information
}

func ParseFlags

func ParseFlags() Flags

type GCPPubSubConfig

type GCPPubSubConfig struct {
	Project                   string `` /* 138-byte string literal not displayed */
	ServiceAccountCredentials string `` /* 313-byte string literal not displayed */
	DeliveryTopic             string `yaml:"delivery_topic" env:"GCP_PUBSUB_DELIVERY_TOPIC" desc:"Name of the GCP Pub/Sub topic for delivery events." required:"N"`
	DeliverySubscription      string `` /* 145-byte string literal not displayed */
	LogTopic                  string `yaml:"log_topic" env:"GCP_PUBSUB_LOG_TOPIC" desc:"Name of the GCP Pub/Sub topic for log events." required:"N"`
	LogSubscription           string `` /* 130-byte string literal not displayed */
}

func (*GCPPubSubConfig) GetProviderType added in v0.3.0

func (c *GCPPubSubConfig) GetProviderType() string

func (*GCPPubSubConfig) IsConfigured added in v0.3.0

func (c *GCPPubSubConfig) IsConfigured() bool

func (*GCPPubSubConfig) ToInfraConfig added in v0.3.0

func (c *GCPPubSubConfig) ToInfraConfig(queueType string) *mqinfra.MQInfraConfig

func (*GCPPubSubConfig) ToQueueConfig added in v0.3.0

func (c *GCPPubSubConfig) ToQueueConfig(ctx context.Context, queueType string) (*mqs.QueueConfig, error)

type IDGenConfig added in v0.8.0

type IDGenConfig struct {
	Type              string `yaml:"type" env:"IDGEN_TYPE" desc:"ID generation type for all entities: uuidv4, uuidv7, nanoid. Default: uuidv4" required:"N"`
	AttemptPrefix     string `` /* 186-byte string literal not displayed */
	DestinationPrefix string `` /* 198-byte string literal not displayed */
	EventPrefix       string `` /* 180-byte string literal not displayed */
}

IDGenConfig is the configuration for ID generation

type MQConfigAdapter added in v0.3.0

type MQConfigAdapter interface {
	ToInfraConfig(queueType string) *mqinfra.MQInfraConfig
	ToQueueConfig(ctx context.Context, queueType string) (*mqs.QueueConfig, error)
	GetProviderType() string
	IsConfigured() bool
}

type MQsConfig

type MQsConfig struct {
	AWSSQS          AWSSQSConfig          `` /* 131-byte string literal not displayed */
	AzureServiceBus AzureServiceBusConfig `` /* 150-byte string literal not displayed */
	GCPPubSub       GCPPubSubConfig       `` /* 138-byte string literal not displayed */
	RabbitMQ        RabbitMQConfig        `` /* 133-byte string literal not displayed */
	AutoProvision   *bool                 `` /* 273-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*MQsConfig) GetInfraType

func (c *MQsConfig) GetInfraType() string

func (*MQsConfig) ToInfraConfig added in v0.3.0

func (c *MQsConfig) ToInfraConfig(queueType string) *mqinfra.MQInfraConfig

func (*MQsConfig) ToQueueConfig added in v0.3.0

func (c *MQsConfig) ToQueueConfig(ctx context.Context, queueType string) (*mqs.QueueConfig, error)

type OSInterface

type OSInterface interface {
	Getenv(key string) string
	// LookupEnv reports whether the variable is present (ok) in addition to its
	// value, so callers can distinguish "unset" from "set to empty string" —
	// a distinction caarlos0/env does not surface.
	LookupEnv(key string) (string, bool)
	Stat(name string) (os.FileInfo, error)
	ReadFile(name string) ([]byte, error)
	Environ() []string
}

type OpenTelemetryConfig

type OpenTelemetryConfig struct {
	ServiceName string                  `` /* 146-byte string literal not displayed */
	Traces      OpenTelemetryTypeConfig `yaml:"traces" desc:"OpenTelemetry configuration specific to traces."`
	Metrics     OpenTelemetryTypeConfig `yaml:"metrics" desc:"OpenTelemetry configuration specific to metrics."`
	Logs        OpenTelemetryTypeConfig `yaml:"logs" desc:"OpenTelemetry configuration specific to logs."`
}

func (*OpenTelemetryConfig) GetServiceName

func (c *OpenTelemetryConfig) GetServiceName() string

func (*OpenTelemetryConfig) ToConfig

func (*OpenTelemetryConfig) Validate

func (c *OpenTelemetryConfig) Validate() error

type OpenTelemetryTypeConfig

type OpenTelemetryTypeConfig struct {
	Exporter string `` /* 213-byte string literal not displayed */
	Protocol string `` /* 210-byte string literal not displayed */
}

type OperatorEventsAWSSQSConfig added in v0.16.0

type OperatorEventsAWSSQSConfig struct {
	QueueURL        string `yaml:"queue_url" env:"OPERATOR_EVENTS_AWS_SQS_QUEUE_URL" desc:"AWS SQS queue URL for operator events." required:"N"`
	AccessKeyID     string `` /* 132-byte string literal not displayed */
	SecretAccessKey string `` /* 144-byte string literal not displayed */
	Region          string `yaml:"region" env:"OPERATOR_EVENTS_AWS_SQS_REGION" desc:"AWS region for SQS operator events sink." required:"N"`
	Endpoint        string `` /* 152-byte string literal not displayed */
}

type OperatorEventsConfig added in v0.16.0

type OperatorEventsConfig struct {
	Topics    []string                     `` /* 198-byte string literal not displayed */
	HTTP      OperatorEventsHTTPConfig     `yaml:"http"`
	AWSSQS    OperatorEventsAWSSQSConfig   `yaml:"aws_sqs"`
	GCPPubSub OperatorEventsGCPConfig      `yaml:"gcp_pubsub"`
	RabbitMQ  OperatorEventsRabbitMQConfig `yaml:"rabbitmq"`
}

func (*OperatorEventsConfig) ToConfig added in v0.16.0

func (c *OperatorEventsConfig) ToConfig() opevents.Config

type OperatorEventsGCPConfig added in v0.16.0

type OperatorEventsGCPConfig struct {
	ProjectID   string `` /* 130-byte string literal not displayed */
	TopicID     string `yaml:"topic_id" env:"OPERATOR_EVENTS_GCP_PUBSUB_TOPIC_ID" desc:"GCP Pub/Sub topic ID for operator events." required:"N"`
	Credentials string `` /* 154-byte string literal not displayed */
}

type OperatorEventsHTTPConfig added in v0.16.0

type OperatorEventsHTTPConfig struct {
	URL           string `yaml:"url" env:"OPERATOR_EVENTS_HTTP_URL" desc:"URL to POST operator events to." required:"N"`
	SigningSecret string `` /* 139-byte string literal not displayed */
}

type OperatorEventsRabbitMQConfig added in v0.16.0

type OperatorEventsRabbitMQConfig struct {
	ServerURL string `yaml:"server_url" env:"OPERATOR_EVENTS_RABBITMQ_SERVER_URL" desc:"RabbitMQ server URL for operator events sink." required:"N"`
	Exchange  string `yaml:"exchange" env:"OPERATOR_EVENTS_RABBITMQ_EXCHANGE" desc:"RabbitMQ exchange for operator events." required:"N"`
}

type OptionalString added in v1.0.6

type OptionalString struct {
	// contains filtered or unexported fields
}

OptionalString is a config value that records whether it was provided at all, distinguishing "unset" from "explicitly set to empty string". This lets a single field express three states — unset, empty, value — which a plain string cannot.

It implements both encoding.TextUnmarshaler (so caarlos0/env binds it as a scalar — avoiding the pointer-recursion crash a *string triggers) and yaml.Unmarshaler (so YAML can express the empty state via `key: ""`).

One gap remains: caarlos0/env ignores a present-but-empty env var entirely and never invokes UnmarshalText for it, so the empty-env case is handled explicitly during parsing via OSInterface.LookupEnv (see captureEmptyEnv).

func NewOptionalString added in v1.0.6

func NewOptionalString(value string) OptionalString

NewOptionalString returns a set OptionalString. Intended for tests and programmatic config construction.

func (OptionalString) Get added in v1.0.6

func (o OptionalString) Get() (string, bool)

Get returns the value and whether it was set.

func (*OptionalString) UnmarshalText added in v1.0.6

func (o *OptionalString) UnmarshalText(b []byte) error

func (*OptionalString) UnmarshalYAML added in v1.0.6

func (o *OptionalString) UnmarshalYAML(node *yaml.Node) error

type PortalConfig

type PortalConfig struct {
	ProxyURL                   string `` /* 197-byte string literal not displayed */
	RefererURL                 string `` /* 210-byte string literal not displayed */
	RefreshURL                 string `` /* 307-byte string literal not displayed */
	FaviconURL                 string `yaml:"favicon_url" env:"PORTAL_FAVICON_URL" desc:"URL for the favicon to be used in the Outpost Portal." required:"N"`
	BrandColor                 string `` /* 195-byte string literal not displayed */
	LogoDark                   string `yaml:"logo_dark" env:"PORTAL_LOGO_DARK" desc:"URL for the dark-mode logo to be displayed in the Outpost Portal." required:"N"`
	OrgName                    string `yaml:"org_name" env:"PORTAL_ORGANIZATION_NAME" desc:"Organization name displayed in the Outpost Portal." required:"N"`
	ForceTheme                 string `` /* 134-byte string literal not displayed */
	DisableOutpostBranding     bool   `` /* 139-byte string literal not displayed */
	EnableDestinationFilter    bool   `` /* 161-byte string literal not displayed */
	EnableWebhookCustomHeaders bool   `` /* 190-byte string literal not displayed */
}

type PublishAWSSQSConfig

type PublishAWSSQSConfig struct {
	AccessKeyID     string `` /* 176-byte string literal not displayed */
	SecretAccessKey string `` /* 188-byte string literal not displayed */
	Region          string `` /* 155-byte string literal not displayed */
	Endpoint        string `` /* 127-byte string literal not displayed */
	Queue           string `` /* 160-byte string literal not displayed */
}

type PublishAzureServiceBusConfig added in v0.4.0

type PublishAzureServiceBusConfig struct {
	ConnectionString string `` /* 217-byte string literal not displayed */
	Topic            string `` /* 193-byte string literal not displayed */
	Subscription     string `` /* 222-byte string literal not displayed */
}

type PublishGCPPubSubConfig

type PublishGCPPubSubConfig struct {
	Project                   string `` /* 172-byte string literal not displayed */
	Topic                     string `` /* 175-byte string literal not displayed */
	Subscription              string `` /* 204-byte string literal not displayed */
	ServiceAccountCredentials string `` /* 281-byte string literal not displayed */
}

type PublishMQConfig

type PublishMQConfig struct {
	AWSSQS          PublishAWSSQSConfig          `` /* 147-byte string literal not displayed */
	AzureServiceBus PublishAzureServiceBusConfig `` /* 166-byte string literal not displayed */
	GCPPubSub       PublishGCPPubSubConfig       `` /* 154-byte string literal not displayed */
	RabbitMQ        PublishRabbitMQConfig        `` /* 149-byte string literal not displayed */
}

func (PublishMQConfig) GetInfraType

func (c PublishMQConfig) GetInfraType() string

func (*PublishMQConfig) GetQueueConfig

func (c *PublishMQConfig) GetQueueConfig() *mqs.QueueConfig

type PublishRabbitMQConfig

type PublishRabbitMQConfig struct {
	ServerURL string `` /* 181-byte string literal not displayed */
	Exchange  string `yaml:"exchange" env:"PUBLISH_RABBITMQ_EXCHANGE" desc:"Name of the RabbitMQ exchange for the publish queue." required:"N"`
	Queue     string `` /* 167-byte string literal not displayed */
}

type RabbitMQConfig

type RabbitMQConfig struct {
	ServerURL     string `` /* 186-byte string literal not displayed */
	Exchange      string `yaml:"exchange" env:"RABBITMQ_EXCHANGE" desc:"Name of the RabbitMQ exchange to use." required:"N"`
	DeliveryQueue string `yaml:"delivery_queue" env:"RABBITMQ_DELIVERY_QUEUE" desc:"Name of the RabbitMQ queue for delivery events." required:"N"`
	LogQueue      string `yaml:"log_queue" env:"RABBITMQ_LOG_QUEUE" desc:"Name of the RabbitMQ queue for log events." required:"N"`
}

func (*RabbitMQConfig) GetProviderType added in v0.3.0

func (c *RabbitMQConfig) GetProviderType() string

func (*RabbitMQConfig) IsConfigured added in v0.3.0

func (c *RabbitMQConfig) IsConfigured() bool

func (*RabbitMQConfig) ToInfraConfig added in v0.3.0

func (c *RabbitMQConfig) ToInfraConfig(queueType string) *mqinfra.MQInfraConfig

func (*RabbitMQConfig) ToQueueConfig added in v0.3.0

func (c *RabbitMQConfig) ToQueueConfig(ctx context.Context, queueType string) (*mqs.QueueConfig, error)

type RedisConfig

type RedisConfig struct {
	Host                   string `yaml:"host" env:"REDIS_HOST" desc:"Hostname or IP address of the Redis server." required:"Y"`
	Port                   int    `yaml:"port" env:"REDIS_PORT" desc:"Port number for the Redis server." required:"Y"`
	Username               string `yaml:"username" env:"REDIS_USERNAME" desc:"Username for Redis ACL authentication." required:"N"`
	Password               string `yaml:"password" env:"REDIS_PASSWORD" desc:"Password for Redis authentication, if required by the server." required:"Y"`
	Database               int    `` /* 132-byte string literal not displayed */
	TLSEnabled             bool   `yaml:"tls_enabled" env:"REDIS_TLS_ENABLED" desc:"Enable TLS encryption for Redis connection." required:"N"`
	ClusterEnabled         bool   `` /* 131-byte string literal not displayed */
	DevClusterHostOverride bool   `` /* 191-byte string literal not displayed */
}

func (*RedisConfig) ToConfig

func (c *RedisConfig) ToConfig() *redis.RedisConfig

type ServiceType

type ServiceType int
const (
	ServiceTypeAll ServiceType = iota
	ServiceTypeAPI
	ServiceTypeLog
	ServiceTypeDelivery
)

func ServiceTypeFromString

func ServiceTypeFromString(s string) (ServiceType, error)

func (ServiceType) String

func (s ServiceType) String() string

type TelemetryConfig

type TelemetryConfig struct {
	Disabled          bool   `` /* 233-byte string literal not displayed */
	BatchSize         int    `yaml:"batch_size" env:"TELEMETRY_BATCH_SIZE" desc:"Maximum number of telemetry events to batch before sending." required:"N"`
	BatchInterval     int    `` /* 177-byte string literal not displayed */
	HookdeckSourceURL string `` /* 194-byte string literal not displayed */
	SentryDSN         string `` /* 175-byte string literal not displayed */
}

func (*TelemetryConfig) ToTelemetryConfig

func (c *TelemetryConfig) ToTelemetryConfig() telemetry.TelemetryConfig

Jump to

Keyboard shortcuts

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