Files
node/src/node_metadata.h
T
Anna Henningsen aa943d098e http: make parser choice a runtime flag
Add a `--http-parser=llhttp` vs `--http-parser=traditional`
command line switch, to make testing and comparing the new
llhttp-based implementation easier.

PR-URL: https://github.com/nodejs/node/pull/24739
Refs: https://github.com/nodejs/node/issues/24730
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2018-12-06 05:21:36 +01:00

53 lines
1.7 KiB
C++

#ifndef SRC_NODE_METADATA_H_
#define SRC_NODE_METADATA_H_
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
#include <string>
namespace node {
#define NODE_VERSIONS_KEYS_BASE(V) \
V(node) \
V(v8) \
V(uv) \
V(zlib) \
V(ares) \
V(modules) \
V(nghttp2) \
V(napi) \
V(llhttp) \
V(http_parser) \
#if HAVE_OPENSSL
#define NODE_VERSIONS_KEY_CRYPTO(V) V(openssl)
#else
#define NODE_VERSIONS_KEY_CRYPTO(V)
#endif
#define NODE_VERSIONS_KEYS(V) \
NODE_VERSIONS_KEYS_BASE(V) \
NODE_VERSIONS_KEY_CRYPTO(V)
class Metadata {
public:
struct Versions {
Versions();
#define V(key) std::string key;
NODE_VERSIONS_KEYS(V)
#undef V
};
Versions versions;
};
// Per-process global
namespace per_process {
extern Metadata metadata;
}
} // namespace node
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
#endif // SRC_NODE_METADATA_H_