MCPcopy
hub / github.com/netdata/netdata / FUNCRESULT

Method FUNCRESULT

src/go/pkg/netdataapi/api.go:151–168  ·  view source on GitHub ↗

FUNCRESULT writes a function result to Netdata.

(result FunctionResult)

Source from the content-addressed store, hash-verified

149
150// FUNCRESULT writes a function result to Netdata.
151func (a *API) FUNCRESULT(result FunctionResult) {
152 var buf bytes.Buffer
153
154 buf.WriteString("FUNCTION_RESULT_BEGIN " +
155 result.UID + " " +
156 result.Code + " " +
157 result.ContentType + " " +
158 result.ExpireTimestamp + "\n",
159 )
160
161 if result.Payload != "" {
162 buf.WriteString(result.Payload + "\n")
163 }
164
165 buf.WriteString("FUNCTION_RESULT_END\n\n")
166
167 _, _ = buf.WriteTo(a)
168}
169
170// CONFIGCREATE creates a new configuration
171func (a *API) CONFIGCREATE(opts ConfigOpts) {

Callers 5

respfMethod · 0.80
SendCodefMethod · 0.80
SendJSONWithCodeMethod · 0.80
sendPayloadMethod · 0.80
TestFUNCRESULTFunction · 0.80

Calls 1

WriteToMethod · 0.65

Tested by 1

TestFUNCRESULTFunction · 0.64