MCPcopy
hub / github.com/vulcand/vulcand / upsertHost

Method upsertHost

api/api.go:157–164  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request, params map[string]string, body []byte)

Source from the content-addressed store, hash-verified

155}
156
157func (c *ProxyController) upsertHost(w http.ResponseWriter, r *http.Request, params map[string]string, body []byte) (interface{}, error) {
158 host, err := parseHostPack(body)
159 if err != nil {
160 return nil, err
161 }
162 log.Infof("Upsert %s", host)
163 return formatResult(host, c.ng.UpsertHost(*host))
164}
165
166func (c *ProxyController) getListeners(w http.ResponseWriter, r *http.Request, params map[string]string, body []byte) (interface{}, error) {
167 ls, err := c.ng.GetListeners()

Callers

nothing calls this directly

Calls 4

parseHostPackFunction · 0.85
formatResultFunction · 0.85
InfofMethod · 0.80
UpsertHostMethod · 0.65

Tested by

no test coverage detected