File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ func (cfg *Config) RegisterFlags(f *flag.FlagSet) {
61
61
}
62
62
63
63
// Validate config and returns error on failure
64
- // TODO need to rebase to call it, because Config validation has been added just recently
65
64
func (cfg * Config ) Validate () error {
66
65
if cfg .Engine != StorageEngineChunks && cfg .Engine != StorageEngineTSDB {
67
66
return errors .New ("unsupported storage engine" )
Original file line number Diff line number Diff line change @@ -122,6 +122,14 @@ func (c *Config) Validate() error {
122
122
if err := c .Encoding .Validate (); err != nil {
123
123
return errors .Wrap (err , "invalid encoding config" )
124
124
}
125
+
126
+ if err := c .Storage .Validate (); err != nil {
127
+ return errors .Wrap (err , "invalid storage config" )
128
+ }
129
+
130
+ if err := c .TSDB .Validate (); err != nil {
131
+ return errors .Wrap (err , "invalid TSDB config" )
132
+ }
125
133
return nil
126
134
}
127
135
You can’t perform that action at this time.
0 commit comments