config

package
v0.0.0-...-dd49a2e Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServiceName    = "telemetry"
	ServiceVersion = "v0.0.0"
)
View Source
var Application = struct {
	LogLevel string `cfg:"log_level" default:"info"`
	Host     string `cfg:"host"      default:"0.0.0.0"`
	Port     string `cfg:"port"      default:"8080"`
	BasePath string `cfg:"base_path"`

	EnableKafkaConsumer bool `cfg:"enable_kafka_consumer"`
	EnableKafkaProducer bool `cfg:"enable_kafka_producer"`
	EnableDatabase      bool `cfg:"enable_database"`

	KafkaConfig wkafka.Config `cfg:"kafka_config"`
	// KafkaConsumer for consuming example
	KafkaConsumer wkafka.ConsumerConfig `cfg:"kafka_consumer"`
	// KafkaTopic for producing example
	KafkaTopic string `cfg:"kafka_topic"`

	// API for talk with http calls
	API map[string]klient.Config `cfg:"api"`

	Telemetry tell.Config

	Database Database `cfg:"database"`
}{}

Functions

func Load

func Load(ctx context.Context) error

Types

type Database

type Database struct {
	DBDatasource string `cfg:"db_datasource" log:"false"`
	DBType       string `cfg:"db_type"       default:"pgx"`
	DBSchema     string `cfg:"db_schema"     default:"public"`

	Migrate Migrate `cfg:"migrate"`
}

type Migrate

type Migrate struct {
	DBDatasource string `cfg:"db_datasource" log:"false"`
	DBType       string `cfg:"db_type"       default:"pgx"`
	DBSchema     string `cfg:"db_schema"     default:"public"`
	DBTable      string `cfg:"db_table"      default:"migration"`
}

type OverrideHold

type OverrideHold struct {
	Memory *string
	Value  string
}

type Prefix

type Prefix struct {
	Vault  string `cfg:"vault"`
	Consul string `cfg:"consul"`
}

Jump to

Keyboard shortcuts

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