MCPcopy
hub / github.com/fagongzi/manba / GetAPI

Method GetAPI

pkg/client/client.go:281–295  ·  view source on GitHub ↗
(id uint64)

Source from the content-addressed store, hash-verified

279}
280
281func (c *client) GetAPI(id uint64) (*metapb.API, error) {
282 meta, err := c.getMetaClient()
283 if err != nil {
284 return nil, err
285 }
286
287 rsp, err := meta.GetAPI(context.Background(), &rpcpb.GetAPIReq{
288 ID: id,
289 }, grpc.FailFast(true))
290 if err != nil {
291 return nil, err
292 }
293
294 return rsp.API, nil
295}
296
297func (c *client) GetAPIList(fn func(*metapb.API) bool) error {
298 meta, err := c.getMetaClient()

Callers

nothing calls this directly

Calls 2

getMetaClientMethod · 0.95
GetAPIMethod · 0.65

Tested by

no test coverage detected