🦴 update skeleton

This commit is contained in:
Fenny
2020-10-31 11:58:00 +01:00
parent ef04d509b9
commit 0692b9048e
10 changed files with 117 additions and 23 deletions

View File

@@ -1,13 +1,21 @@
package postgres
import "time"
// Config defines the config for storage.
type Config struct {
GCInterval time.Duration
}
// ConfigDefault is the default config
var ConfigDefault = Config{}
var ConfigDefault = Config{
GCInterval: 10 * time.Second,
}
// Helper function to set default values
func configDefault(cfg Config) Config {
if int(cfg.GCInterval) == 0 {
cfg.GCInterval = ConfigDefault.GCInterval
}
return cfg
}