github.com/helmwave/helmwave@v0.36.4-0.20240509190856-b35563eba4c6/pkg/monitor/validate.go (about) 1 package monitor 2 3 func (c *config) Validate() error { 4 if c.Name() == "" { 5 return ErrNameEmpty 6 } 7 8 if c.TotalTimeout < c.IterationTimeout { 9 return ErrLowTotalTimeout 10 } 11 12 if c.Interval == 0 { 13 return ErrLowInterval 14 } 15 16 err := c.subConfig.Validate() 17 if err != nil { 18 return NewSubMonitorError(err) 19 } 20 21 return nil 22 }