()
| 161 | } |
| 162 | |
| 163 | func (cfg *ProcessorConfig) Validate() error { |
| 164 | var errs []error |
| 165 | if err := validation.ValidateHostInfoHostIdentifiers(cfg.HostInfo.HostIdentifiers); err != nil { |
| 166 | errs = append(errs, err) |
| 167 | } |
| 168 | if err := validation.ValidateHostInfoMetricName(cfg.HostInfo.MetricName); err != nil { |
| 169 | errs = append(errs, err) |
| 170 | } |
| 171 | |
| 172 | if len(errs) > 0 { |
| 173 | return multierr.Combine(errs...) |
| 174 | } |
| 175 | return nil |
| 176 | } |
| 177 | |
| 178 | // copyWithOverrides creates a copy of the config using values set in the overrides. |
| 179 | func (cfg *ProcessorConfig) copyWithOverrides(o metricsGeneratorOverrides, userID string) (ProcessorConfig, error) { |
nothing calls this directly
no test coverage detected