MCPcopy Index your code
hub / github.com/FunctionStream/function-stream / callAPI

Method callAPI

admin/client/client.go:254–276  ·  view source on GitHub ↗

callAPI do the request.

(request *http.Request)

Source from the content-addressed store, hash-verified

252
253// callAPI do the request.
254func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
255 if c.cfg.Debug {
256 dump, err := httputil.DumpRequestOut(request, true)
257 if err != nil {
258 return nil, err
259 }
260 log.Printf("\n%s\n", string(dump))
261 }
262
263 resp, err := c.cfg.HTTPClient.Do(request)
264 if err != nil {
265 return resp, err
266 }
267
268 if c.cfg.Debug {
269 dump, err := httputil.DumpResponse(resp, true)
270 if err != nil {
271 return resp, err
272 }
273 log.Printf("\n%s\n", string(dump))
274 }
275 return resp, err
276}
277
278// Allow modification of underlying config for alternate implementations and testing
279// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior

Callers 11

ConsumeMessageExecuteMethod · 0.80
ProduceMessageExecuteMethod · 0.80
GetStatusExecuteMethod · 0.80
GetStateExecuteMethod · 0.80
SetStateExecuteMethod · 0.80
CreateFunctionExecuteMethod · 0.80
DeleteFunctionExecuteMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected