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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#ifndef CEPH_CLS_LUA_H
#define CEPH_CLS_LUA_H
#define LOG_LEVEL_DEFAULT 10
struct clslua_cmd {
string script;
string funcname;
bufferlist input;
void encode(bufferlist& bl) const {
ENCODE_START(1, 1, bl);
::encode(script, bl);
::encode(funcname, bl);
::encode(input, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::iterator& bl) {
DECODE_START(1, bl);
::decode(script, bl);
::decode(funcname, bl);
::decode(input, bl);
DECODE_FINISH(bl);
}
};
WRITE_CLASS_ENCODER(clslua_cmd);
struct clslua_reply {
vector<string> log;
bufferlist output;
void encode(bufferlist& bl) const {
ENCODE_START(1, 1, bl);
::encode(log, bl);
::encode(output, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::iterator& bl) {
DECODE_START(1, bl);
::decode(log, bl);
::decode(output, bl);
DECODE_FINISH(bl);
}
};
WRITE_CLASS_ENCODER(clslua_reply);
#endif
|