NotifyJobCreate registers/updates a config in the dyncfg API (upsert).
(cfg C, status Status)
| 392 | |
| 393 | // NotifyJobCreate registers/updates a config in the dyncfg API (upsert). |
| 394 | func (h *Handler[C]) NotifyJobCreate(cfg C, status Status) { |
| 395 | isDyncfg := cfg.SourceType() == "dyncfg" |
| 396 | h.api.ConfigCreate(netdataapi.ConfigOpts{ |
| 397 | ID: h.cb.ConfigID(cfg), |
| 398 | Status: status.String(), |
| 399 | ConfigType: ConfigTypeJob.String(), |
| 400 | Path: h.path, |
| 401 | SourceType: cfg.SourceType(), |
| 402 | Source: cfg.Source(), |
| 403 | SupportedCommands: h.jobSupportedCommands(isDyncfg), |
| 404 | }) |
| 405 | } |
| 406 | |
| 407 | // NotifyJobStatus sends a status update for a config. |
| 408 | func (h *Handler[C]) NotifyJobStatus(cfg C, status Status) { |
no test coverage detected