config: add gc and dedupe as configurable params (default to enabled)

Since we want to conform to dist-spec, sometimes the gc and dedupe
optimizations conflict with the conformance tests that are being run.
So allow them to be turned off via configuration params.
This commit is contained in:
Ramkumar Chinchani
2020-04-15 16:24:05 -07:00
parent b1f882e1b8
commit dd1fc1e866
4 changed files with 56 additions and 29 deletions
+3
View File
@@ -12,6 +12,8 @@ var Commit string
type StorageConfig struct {
RootDirectory string
GC bool
Dedupe bool
}
type TLSConfig struct {
@@ -77,6 +79,7 @@ func NewConfig() *Config {
return &Config{
Version: dspec.Version,
Commit: Commit,
Storage: StorageConfig{GC: true, Dedupe: true},
HTTP: HTTPConfig{Address: "127.0.0.1", Port: "8080"},
Log: &LogConfig{Level: "debug"},
}