diff options
Diffstat (limited to 'src/cls/lua/cls_lua_ops.h')
-rw-r--r-- | src/cls/lua/cls_lua_ops.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/cls/lua/cls_lua_ops.h b/src/cls/lua/cls_lua_ops.h new file mode 100644 index 00000000..c4afbd8a --- /dev/null +++ b/src/cls/lua/cls_lua_ops.h @@ -0,0 +1,31 @@ +#ifndef CEPH_CLS_LUA_OPS_H +#define CEPH_CLS_LUA_OPS_H + +#include <string> + +#include "include/encoding.h" + +struct cls_lua_eval_op { + std::string script; + std::string handler; + bufferlist input; + + void encode(bufferlist &bl) const { + ENCODE_START(1, 1, bl); + encode(script, bl); + encode(handler, bl); + encode(input, bl); + ENCODE_FINISH(bl); + } + + void decode(bufferlist::const_iterator &bl) { + DECODE_START(1, bl); + decode(script, bl); + decode(handler, bl); + decode(input, bl); + DECODE_FINISH(bl); + } +}; +WRITE_CLASS_ENCODER(cls_lua_eval_op) + +#endif |