MCPcopy Create free account
hub / github.com/docker/go-plugins-helpers / pluginRequest

Function pluginRequest

volume/api_test.go:114–128  ·  view source on GitHub ↗
(client *http.Client, method string, req interface{})

Source from the content-addressed store, hash-verified

112}
113
114func pluginRequest(client *http.Client, method string, req interface{}) (io.Reader, error) {
115 b, err := json.Marshal(req)
116 if err != nil {
117 return nil, err
118 }
119 if req == nil {
120 b = []byte{}
121 }
122 resp, err := client.Post("http://localhost"+method, "application/json", bytes.NewReader(b))
123 if err != nil {
124 return nil, err
125 }
126
127 return resp.Body, nil
128}
129
130type testPlugin struct {
131 volumes []string

Callers 1

TestHandlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…