config

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 3 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 {
	NewInstanceTopic                  string        `envconfig:"INPUT_FILE_AVAILABLE_TOPIC"`
	NewInstanceConsumerGroup          string        `envconfig:"INPUT_FILE_AVAILABLE_CONSUMER_GROUP"`
	ObservationsInsertedTopic         string        `envconfig:"IMPORT_OBSERVATIONS_INSERTED_TOPIC"`
	ObservationsInsertedConsumerGroup string        `envconfig:"IMPORT_OBSERVATIONS_INSERTED_CONSUMER_GROUP"`
	HierarchyBuiltTopic               string        `envconfig:"HIERARCHY_BUILT_TOPIC"`
	HierarchyBuiltConsumerGroup       string        `envconfig:"HIERARCHY_BUILT_CONSUMER_GROUP"`
	SearchBuiltTopic                  string        `envconfig:"SEARCH_BUILT_TOPIC"`
	SearchBuiltConsumerGroup          string        `envconfig:"SEARCH_BUILT_CONSUMER_GROUP"`
	DataImportCompleteTopic           string        `envconfig:"DATA_IMPORT_COMPLETE_TOPIC"`
	KafkaAddr                         []string      `envconfig:"KAFKA_ADDR"`
	KafkaVersion                      string        `envconfig:"KAFKA_VERSION"`
	KafkaOffsetOldest                 bool          `envconfig:"KAFKA_OFFSET_OLDEST"`
	KafkaSecProtocol                  string        `envconfig:"KAFKA_SEC_PROTO"`
	KafkaSecCACerts                   string        `envconfig:"KAFKA_SEC_CA_CERTS"`
	KafkaSecClientCert                string        `envconfig:"KAFKA_SEC_CLIENT_CERT"`
	KafkaSecClientKey                 string        `envconfig:"KAFKA_SEC_CLIENT_KEY"                 json:"-"`
	KafkaSecSkipVerify                bool          `envconfig:"KAFKA_SEC_SKIP_VERIFY"`
	ImportAPIAddr                     string        `envconfig:"IMPORT_API_ADDR"`
	DatasetAPIAddr                    string        `envconfig:"DATASET_API_ADDR"`
	DatasetAPIMaxWorkers              int           `envconfig:"DATASET_API_MAX_WORKERS"` // maximum number of concurrent go-routines requesting items to datast api at the same time
	DatasetAPIBatchSize               int           `envconfig:"DATASET_API_BATCH_SIZE"`  // maximum size of a response by dataset api when requesting items in batches
	ShutdownTimeout                   time.Duration `envconfig:"GRACEFUL_SHUTDOWN_TIMEOUT"`
	BindAddr                          string        `envconfig:"BIND_ADDR"`
	ServiceAuthToken                  string        `envconfig:"SERVICE_AUTH_TOKEN"                   json:"-"`
	CheckCompleteInterval             time.Duration `envconfig:"CHECK_COMPLETE_INTERVAL"`
	InitialiseListInterval            time.Duration `envconfig:"INITIALISE_LIST_INTERVAL"`
	InitialiseListAttempts            int           `envconfig:"INITIALISE_LIST_ATTEMPTS"`
	HealthCheckInterval               time.Duration `envconfig:"HEALTHCHECK_INTERVAL"`
	HealthCheckCriticalTimeout        time.Duration `envconfig:"HEALTHCHECK_CRITICAL_TIMEOUT"`
}

Config represents the app configuration

func NewConfig

func NewConfig() (*Config, error)

NewConfig creates the config object

func (Config) String

func (config Config) String() string

String is implemented to prevent sensitive fields being logged. The config is returned as JSON with sensitive fields omitted.

Jump to

Keyboard shortcuts

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