Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync configuration and koanf packages #30

Merged
merged 1 commit into from
Jan 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkg/config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type Postgres struct {
Password string
SSLMode string

MaxIdelConns int
MaxIdleConns int
MaxOpenConns int
ConnMaxIdleTime time.Duration
ConnMaxLifetime time.Duration
Expand Down Expand Up @@ -62,3 +62,7 @@ type Kafka struct {
Addresses string
Topic string
}

type NATS struct {
URL string `koanf:"url"`
}
13 changes: 8 additions & 5 deletions pkg/koanf/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ type Redis struct {
}

type ElasticSearch struct {
Address string `koanf:"address"`
Username string `koanf:"username"`
Password string `koanf:"password"`
IsOpenSearch bool `koanf:"is_open_search"`
AwsRegion string `koanf:"aws_region"`
Address string `koanf:"address"`
Username string `koanf:"username"`
Password string `koanf:"password"`
IsOpenSearch bool `koanf:"is_open_search"`
AWSRegion string `koanf:"aws_region"`
AssumeRoleARN string `koanf:"assume_role_arn"`
ExternalID string `koanf:"external_id"`
IngestionEndpoint string `koanf:"ingestion_endpoint"`
}

type Postgres struct {
Expand Down