config

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 6 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 {
	BindAddr                   string        `envconfig:"BIND_ADDR"`
	AwsRegion                  string        `envconfig:"AWS_REGION"`
	BucketName                 string        `envconfig:"BUCKET_NAME"`
	DatasetAPIURL              string        `envconfig:"DATASET_API_URL"`
	DownloadServiceToken       string        `envconfig:"DOWNLOAD_SERVICE_TOKEN"     json:"-"`
	DatasetAuthToken           string        `envconfig:"DATASET_AUTH_TOKEN"         json:"-"`
	FilterAPIURL               string        `envconfig:"FILTER_API_URL"`
	ImageAPIURL                string        `envconfig:"IMAGE_API_URL"`
	FilesApiURL                string        `envconfig:"FILES_API_URL"`
	GracefulShutdownTimeout    time.Duration `envconfig:"GRACEFUL_SHUTDOWN_TIMEOUT"  json:"-"`
	HealthCheckInterval        time.Duration `envconfig:"HEALTHCHECK_INTERVAL"`
	HealthCheckCriticalTimeout time.Duration `envconfig:"HEALTHCHECK_CRITICAL_TIMEOUT"`
	OTBatchTimeout             time.Duration `encconfig:"OTEL_BATCH_TIMEOUT"`
	OTExporterOTLPEndpoint     string        `envconfig:"OTEL_EXPORTER_OTLP_ENDPOINT"`
	OTServiceName              string        `envconfig:"OTEL_SERVICE_NAME"`
	OtelEnabled                bool          `envconfig:"OTEL_ENABLED"`
	ServiceAuthToken           string        `envconfig:"SERVICE_AUTH_TOKEN"         json:"-"`
	SecretKey                  string        `envconfig:"SECRET_KEY"                 json:"-"`
	ZebedeeURL                 string        `envconfig:"ZEBEDEE_URL"`
	LocalObjectStore           string        `envconfig:"LOCAL_OBJECT_STORE"` // TODO remove replacing minio with localstack in component tests
	MinioAccessKey             string        `envconfig:"MINIO_ACCESS_KEY"`   // TODO remove replacing minio with localstack in component tests
	MinioSecretKey             string        `envconfig:"MINIO_SECRET_KEY"`   // TODO remove replacing minio with localstack in component tests
	IsPublishing               bool          `envconfig:"IS_PUBLISHING"`
	PublicBucketURL            ConfigUrl     `envconfig:"PUBLIC_BUCKET_URL"`
	MaxConcurrentHandlers      int           `envconfig:"MAX_CONCURRENT_HANDLERS"`
}

Config represents the configuration required for the dp-download-service

func Get

func Get() (*Config, error)

Get retrieves the config from the environment for the dp-download-service

type ConfigUrl added in v1.16.0

type ConfigUrl struct {
	url.URL
}

func (*ConfigUrl) Decode added in v1.16.0

func (c *ConfigUrl) Decode(value string) error

Jump to

Keyboard shortcuts

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