MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / call

Function call

libatomic/tests/review_node_smoke.mjs:20–26  ·  view source on GitHub ↗
(service, method, input)

Source from the content-addressed store, hash-verified

18].sort());
19
20async function call(service, method, input) {
21 const operation = root.lookupService(`atomic.${service}`).methods[method].resolve();
22 const codec = operation.resolvedRequestType;
23 assert.equal(codec.verify(input), null);
24 const bytes = await native.call(`/atomic.${service}/${method}`, codec.encode(input).finish());
25 return operation.resolvedResponseType.decode(bytes);
26}
27
28const { repository } = await call('DaemonService', 'ResolveRepository', { path: process.env.ATOMIC_REVIEW_TEST_ROOT });
29const report = await call('ReviewService', 'GenerateReview', { repository, view: process.env.ATOMIC_REVIEW_TEST_VIEW });

Calls 7

resolveMethod · 0.45
equalMethod · 0.45
verifyMethod · 0.45
callMethod · 0.45
finishMethod · 0.45
encodeMethod · 0.45
decodeMethod · 0.45