config

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 3 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 KafkaTLSProtocolFlag = "TLS"

KafkaTLSProtocolFlag informs service to use TLS protocol for kafka

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BindAddr                     string        `envconfig:"BIND_ADDR"`
	GracefulShutdownTimeout      time.Duration `envconfig:"GRACEFUL_SHUTDOWN_TIMEOUT"`
	HealthCheckInterval          time.Duration `envconfig:"HEALTHCHECK_INTERVAL"`
	HealthCheckCriticalTimeout   time.Duration `envconfig:"HEALTHCHECK_CRITICAL_TIMEOUT"`
	DefaultRequestTimeout        time.Duration `envconfig:"DEFAULT_REQUEST_TIMEOUT"`
	DefaultMaximumLimit          int           `envconfig:"DEFAULT_MAXIMUM_LIMIT"`
	ComponentTestUseLogFile      bool          `envconfig:"COMPONENT_TEST_USE_LOG_FILE"`
	CantabularURL                string        `envconfig:"CANTABULAR_URL"`
	CantabularExtURL             string        `envconfig:"CANTABULAR_API_EXT_URL"`
	DatasetAPIURL                string        `envconfig:"DATASET_API_URL"`
	DownloadServiceURL           string        `envconfig:"DOWNLOAD_SERVICE_URL"`
	PopulationTypesAPIURL        string        `envconfig:"POPULATION_TYPES_API_URL"`
	MetadataAPIURL               string        `envconfig:"CANTABULAR_METADATA_API_URL"`
	FilterAPIURL                 string        `envconfig:"FILTER_API_URL"`
	CantabularFilterFlexAPIURL   string        `envconfig:"CANTABULAR_FILTER_FLEX_API_URL"`
	FiltersCollection            string        `envconfig:"FILTERS_COLLECTION"`
	FilterOutputsCollection      string        `envconfig:"FILTER_OUTPUTS_COLLECTION"`
	EnablePrivateEndpoints       bool          `envconfig:"ENABLE_PRIVATE_ENDPOINTS"`
	EnablePermissionsAuth        bool          `envconfig:"ENABLE_PERMISSIONS_AUTH"`
	CantabularHealthcheckEnabled bool          `envconfig:"CANTABULAR_HEALTHCHECK_ENABLED"`
	ServiceAuthToken             string        `envconfig:"SERVICE_AUTH_TOKEN"`
	ZebedeeURL                   string        `envconfig:"ZEBEDEE_URL"`
	DatasetOptionsWorkers        int           `envconfig:"DATASET_OPTIONS_WORKERS"`
	DatasetOptionsBatchSize      int           `envconfig:"DATASET_OPTIONS_BATCH_SIZE"`
	OTExporterOTLPEndpoint       string        `envconfig:"OTEL_EXPORTER_OTLP_ENDPOINT"`
	OTServiceName                string        `envconfig:"OTEL_SERVICE_NAME"`
	OTBatchTimeout               time.Duration `envconfig:"OTEL_BATCH_TIMEOUT"`
	MaxRowsReturned              int           `envconfig:"MAX_ROWS_RETURNED"`
	EnableURLRewriting           bool          `envconfig:"ENABLE_URL_REWRITING"`
	Mongo                        mongo.MongoDriverConfig
	KafkaConfig                  KafkaConfig
}

Config represents service configuration for dp-cantabular-filter-flex-api

func Get

func Get() (*Config, error)

Get returns the default config with any modifications through environment variables

type KafkaConfig added in v1.2.0

type KafkaConfig struct {
	Addr                      []string `envconfig:"KAFKA_ADDR"                            json:"-"`
	ConsumerMinBrokersHealthy int      `envconfig:"KAFKA_CONSUMER_MIN_BROKERS_HEALTHY"`
	ProducerMinBrokersHealthy int      `envconfig:"KAFKA_PRODUCER_MIN_BROKERS_HEALTHY"`
	Version                   string   `envconfig:"KAFKA_VERSION"`
	OffsetOldest              bool     `envconfig:"KAFKA_OFFSET_OLDEST"`
	NumWorkers                int      `envconfig:"KAFKA_NUM_WORKERS"`
	MaxBytes                  int      `envconfig:"KAFKA_MAX_BYTES"`
	SecProtocol               string   `envconfig:"KAFKA_SEC_PROTO"`
	SecCACerts                string   `envconfig:"KAFKA_SEC_CA_CERTS"`
	SecClientKey              string   `envconfig:"KAFKA_SEC_CLIENT_KEY"                  json:"-"`
	SecClientCert             string   `envconfig:"KAFKA_SEC_CLIENT_CERT"`
	SecSkipVerify             bool     `envconfig:"KAFKA_SEC_SKIP_VERIFY"`
	ExportStartTopic          string   `envconfig:"KAFKA_TOPIC_CANTABULAR_EXPORT_START"`
	ExportStartGroup          string   `envconfig:"KAFKA_GROUP_CANTABULAR_EXPORT_START"`
	TLSProtocolFlag           bool     `envconfig:"TLS_PROTOCOL_FLAG"`
}

Jump to

Keyboard shortcuts

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