Files
scylladb/api/api.hh
Amnon Heiman b795acdf63 Adds the database to the API context
The API needs the database distribute object to get information from it.
This adds a database reference the API context so it would be
available in the API.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-05-19 13:27:57 +03:00

24 lines
371 B
C++

/*
* Copyright 2015 Cloudius Systems
*/
#ifndef API_API_HH_
#define API_API_HH_
#include "http/httpd.hh"
#include "database.hh"
namespace api {
struct http_context {
http_server_control http_server;
distributed<database>& db;
http_context(distributed<database>& _db) : db(_db) {}
};
future<> set_server(http_context& ctx);
}
#endif /* API_API_HH_ */