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

add default definition for common.tmp_dir #44

Merged
merged 3 commits into from
Apr 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
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The configuration is organized into six sections:
In the `common` section of the configuration, you can specify the following settings:

* `pg_bin_path` — path to the PostgreSQL binaries. Note that the PostgreSQL server version must match the provided binaries.
* `tmp_dir` — temporary directory for storing the table of contents files
* `tmp_dir` — temporary directory for storing the table of contents files. Default value is `/tmp`

!!! note

Expand Down
5 changes: 5 additions & 0 deletions internal/domains/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@ var (
once sync.Once
)

const defaultDirectoryStoragePath = "/tmp"

func NewConfig() *Config {
once.Do(
func() {
Cfg = &Config{
Common: Common{
TempDirectory: defaultDirectoryStoragePath,
},
Storage: StorageConfig{
S3: s3.NewConfig(),
},
Expand Down