MCPcopy Create free account
hub / github.com/ceph/ceph / exec

Function exec

src/cls/lua/cls_lua_client.cc:22–38  ·  view source on GitHub ↗

* Currently the return code and return bufferlist are not wrapped in a * protocol that allows object class vs Lua to be distinguished. For * instance, -EOPNOTSUPP might refer to cls_lua not being found, but would * also be returned when cls_lua is found, but a Lua handler is not found. */

Source from the content-addressed store, hash-verified

20 * also be returned when cls_lua is found, but a Lua handler is not found.
21 */
22 int exec(IoCtx& ioctx, const string& oid, const string& script,
23 const string& handler, bufferlist& input, bufferlist& output)
24 {
25 cls_lua_eval_op op;
26
27 op.script = script;
28 op.handler = handler;
29 op.input = input;
30
31 bufferlist inbl;
32 encode(op, inbl);
33
34 librados::ObjectWriteOperation wop;
35 int rval;
36 wop.exec(method::eval_bufferlist, inbl, &output, &rval);
37 return ioctx.operate(oid, &wop);
38 }
39}

Callers 2

spawnMethod · 0.50
execMethod · 0.50

Calls 3

encodeFunction · 0.50
execMethod · 0.45
operateMethod · 0.45

Tested by

no test coverage detected