7#include <Cutelyst/Headers>
8#include <Cutelyst/cutelyst_global.h>
10#include <QHostAddress>
19class CUTELYST_LIBRARY
Engine :
public QObject
40 [[nodiscard]]
virtual int workerId()
const = 0;
45 [[nodiscard]]
int workerCore()
const;
54 [[nodiscard]]
inline bool isZeroWorker()
const;
59 [[nodiscard]] QVariantMap opts()
const;
66 [[nodiscard]] QVariantMap config(
const QString &entity)
const;
71 void setConfig(
const QVariantMap &config);
76 [[nodiscard]]
static QVariantMap loadIniConfig(
const QString &filename);
81 [[nodiscard]]
static QVariantMap loadJsonConfig(
const QString &filename);
88 virtual quint64 time();
102 static const char *httpStatusMessage(quint16 status,
int *len =
nullptr);
124 bool initApplication();
138 bool postForkApplication();
143 [[nodiscard]]
Headers &defaultHeaders();
145 EnginePrivate *d_ptr;
156 virtual bool init() = 0;
The Cutelyst Application.
int workerCore() const
Each worker process migth have a number of worker cores (threads), a single process with two worker t...
virtual int workerId() const =0
The id is the number of the spawned engine process, a single process workerId = 0,...
bool isZeroWorker() const
void processRequestAsync(Cutelyst::EngineRequest *request)
The Cutelyst namespace holds all public Cutelyst API.