summaryrefslogtreecommitdiffstats
path: root/src/cls/lua/cls_lua_ops.h
blob: c4afbd8a2dddfcbfb878473765553f4b20737ec1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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