config

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 5 Imported by: 1 module, 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 (
	// CountersCollectionTitle is the well known name of the MongoDB collection for
	// counters relating to migration jobs.
	CountersCollectionTitle = "MigrationsCountersCollection"
	// CountersCollectionName is the actual name of the MongoDB collection for
	// counters relating to migration jobs.
	CountersCollectionName = "counters"
	// JobsCollectionTitle is the well known name of the MongoDB collection for
	// migration jobs.
	JobsCollectionTitle = "MigrationsJobsCollection"
	// JobsCollectionName is the actual name of the MongoDB collection for
	// migration jobs.
	JobsCollectionName = "jobs"
	// EventsCollectionTitle is the well known name of the MongoDB collection
	// for migration events.
	EventsCollectionTitle = "MigrationsEventsCollection"
	// EventsCollectionName is the actual name of the MongoDB collection for
	// migration events.
	EventsCollectionName = "events"
	// TasksCollectionTitle is the well known name of the MongoDB collection
	// for migration tasks.
	TasksCollectionTitle = "MigrationsTasksCollection"
	// TasksCollectionName is the actual name of the MongoDB collection for
	// migration tasks.
	TasksCollectionName = "tasks"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BindAddr                        string        `envconfig:"BIND_ADDR"`
	DatasetAPIURL                   string        `envconfig:"DATASET_API_URL"`
	DefaultLimit                    int           `envconfig:"DEFAULT_LIMIT"`
	DefaultOffset                   int           `envconfig:"DEFAULT_OFFSET"`
	DefaultMaxLimit                 int           `envconfig:"DEFAULT_MAX_LIMIT"`
	EnableEventLogging              bool          `envconfig:"ENABLE_EVENT_LOGGING"`
	EnableMockClients               bool          `envconfig:"ENABLE_MOCK_CLIENTS"`
	FilesAPIURL                     string        `envconfig:"FILES_API_URL"`
	GracefulShutdownTimeout         time.Duration `envconfig:"GRACEFUL_SHUTDOWN_TIMEOUT"`
	HealthCheckInterval             time.Duration `envconfig:"HEALTHCHECK_INTERVAL"`
	HealthCheckCriticalTimeout      time.Duration `envconfig:"HEALTHCHECK_CRITICAL_TIMEOUT"`
	MigratorMaxConcurrentExecutions int           `envconfig:"MIGRATOR_MAX_CONCURRENT_EXECUTIONS"`
	MigratorPollInterval            time.Duration `envconfig:"MIGRATOR_POLL_INTERVAL"`
	OTBatchTimeout                  time.Duration `envconfig:"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:"-"`
	TopicAPIURL                     string        `envconfig:"TOPIC_API_URL"`
	TopicCacheUpdateInterval        time.Duration `envconfig:"TOPIC_CACHE_UPDATE_INTERVAL"`
	EnableTopicCache                bool          `envconfig:"ENABLE_TOPIC_CACHE"`
	UploadServiceURL                string        `envconfig:"UPLOAD_SERVICE_URL"`
	ZebedeeURL                      string        `envconfig:"ZEBEDEE_URL"`
	MongoConfig
	AuthConfig  *authorisation.Config
	SlackConfig *slack.Config
}

Config represents service configuration for dis-migration-service

func Get

func Get() (*Config, error)

Get returns the default config with any modifications through environment variables

type MongoConfig added in v0.4.0

type MongoConfig struct {
	dpMongo.MongoDriverConfig
}

MongoConfig holds MongoDB configuration settings.

Jump to

Keyboard shortcuts

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