created build tooling, subtrees, and stub code for a new NGINX core module
Signed-off-by: Ava Affine <ava@sunnypup.io>
This commit is contained in:
parent
2b63c55768
commit
19fafc6a8c
6 changed files with 4315 additions and 2 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
libmuninn.so
|
||||
libmuninn.dylib
|
||||
nginx/.cache
|
||||
32
Makefile
Normal file
32
Makefile
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
NGINX_SOURCE_DIR = nginx
|
||||
|
||||
ifeq (, $(shell which bear))
|
||||
MUNIN_BEAR=make
|
||||
else
|
||||
MUNIN_BEAR=bear --
|
||||
endif
|
||||
|
||||
ifneq ($(MUNINN_NGINX_DEBUG),)
|
||||
MUNINN_NGINX_DEBUG="--with-debug"
|
||||
endif
|
||||
|
||||
CURDIR = $(.CURDIR)
|
||||
|
||||
.PHONY: all clean build
|
||||
|
||||
all: nginx/objs/nginx
|
||||
|
||||
nginx/objs/Makefile:
|
||||
cd $(NGINX_SOURCE_DIR) && \
|
||||
./auto/configure \
|
||||
$(MUNINN_NGINX_DEBUG) \
|
||||
--with-http_ssl_module \
|
||||
--with-compat \
|
||||
--add-module=$(.CURDIR)
|
||||
|
||||
nginx/objs/nginx: nginx/objs/Makefile
|
||||
$(MUNIN_BEAR) make -C $(NGINX_SOURCE_DIR)
|
||||
|
||||
clean:
|
||||
make -C $(NGINX_SOURCE_DIR) clean
|
||||
|
||||
|
|
@ -22,10 +22,10 @@ The loose plan to implement Muninn is as follows:
|
|||
9. Muninn can identify as authoritatively owning a certain DN (and Peers abide).
|
||||
10. Something other than logging is done for conflicts over who owns what DN
|
||||
|
||||
Currently Muninn is on phase 1.
|
||||
Currently Muninn is on phase 2.
|
||||
|
||||
## Building Muninn
|
||||
TODO
|
||||
simply run `make`.
|
||||
|
||||
## Running Muninn
|
||||
TODO
|
||||
|
|
|
|||
4246
compile_commands.json
Normal file
4246
compile_commands.json
Normal file
File diff suppressed because it is too large
Load diff
5
config
Normal file
5
config
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
ngx_module_name=muninn
|
||||
ngx_module_srcs="$ngx_addon_dir/muninn.c"
|
||||
ngx_module_link=YES
|
||||
|
||||
. auto/module
|
||||
27
muninn.c
Normal file
27
muninn.c
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#include <ngx_config.h>
|
||||
#include <ngx_core.h>
|
||||
|
||||
static ngx_command_t ngx_muninn_commands[] = {};
|
||||
|
||||
static ngx_core_module_t ngx_muninn_module_ctx = {
|
||||
ngx_string("muninn"),
|
||||
NULL, // create conf
|
||||
NULL // init conf
|
||||
};
|
||||
|
||||
ngx_module_t ngx_muninn_core_module = {
|
||||
NGX_MODULE_V1,
|
||||
&ngx_muninn_module_ctx, /* module context */
|
||||
ngx_muninn_commands, /* module directives */
|
||||
NGX_CORE_MODULE, /* module type */
|
||||
NULL, /* init master */
|
||||
NULL, /* init module */
|
||||
NULL, /* init process */
|
||||
NULL, /* init thread */
|
||||
NULL, /* exit thread */
|
||||
NULL, /* exit process */
|
||||
NULL, /* exit master */
|
||||
NGX_MODULE_V1_PADDING
|
||||
};
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue