MCPcopy
hub / github.com/netdata/netdata / NotifyJobCreate

Method NotifyJobCreate

src/go/plugin/framework/dyncfg/handler.go:394–405  ·  view source on GitHub ↗

NotifyJobCreate registers/updates a config in the dyncfg API (upsert).

(cfg C, status Status)

Source from the content-addressed store, hash-verified

392
393// NotifyJobCreate registers/updates a config in the dyncfg API (upsert).
394func (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.
408func (h *Handler[C]) NotifyJobStatus(cfg C, status Status) {

Callers 8

CmdAddMethod · 0.95
CmdUpdateMethod · 0.95
addConfigMethod · 0.80
addConfigMethod · 0.80
PublishExistingMethod · 0.80
publishInitialConfigMethod · 0.80
dyncfgCmdAddMethod · 0.80

Calls 6

jobSupportedCommandsMethod · 0.95
ConfigCreateMethod · 0.80
SourceTypeMethod · 0.65
ConfigIDMethod · 0.65
SourceMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected