MCPcopy
hub / github.com/vulcand/vulcand / TopFrontends

Method TopFrontends

api/client.go:127–139  ·  view source on GitHub ↗
(bk *engine.BackendKey, limit int)

Source from the content-addressed store, hash-verified

125}
126
127func (c *Client) TopFrontends(bk *engine.BackendKey, limit int) ([]engine.Frontend, error) {
128 values := url.Values{
129 "limit": {fmt.Sprintf("%d", limit)},
130 }
131 if bk != nil {
132 values["backendId"] = []string{bk.Id}
133 }
134 response, err := c.Get(c.endpoint("top", "frontends"), values)
135 if err != nil {
136 return nil, err
137 }
138 return engine.FrontendsFromJSON(c.Registry.GetRouter(), response)
139}
140
141func (c *Client) DeleteFrontend(fk engine.FrontendKey) error {
142 return c.Delete(c.endpoint("frontends", fk.Id))

Callers

nothing calls this directly

Calls 4

GetMethod · 0.95
endpointMethod · 0.95
FrontendsFromJSONFunction · 0.92
GetRouterMethod · 0.80

Tested by

no test coverage detected