summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_lua_request.h
blob: 7c85ac9cd984ff34628992a14ab46ccf4ffd44cb (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
#pragma once

#include <string>
#include "include/common_fwd.h"
#include "rgw_sal_fwd.h"

struct lua_State;
class req_state;
class RGWREST;
class OpsLogSink;

namespace rgw::lua::request {

// create the request metatable
void create_top_metatable(lua_State* L, req_state* s, const char* op_name);

// execute a lua script in the Request context
int execute(
    rgw::sal::Driver* driver,
    RGWREST* rest,
    OpsLogSink* olog,
    req_state *s, 
    RGWOp* op,
    const std::string& script);
} // namespace rgw::lua::request