feat: port nginx :report subcommand to golang
The bash :report implementation for the nginx-vhosts plugin is replaced with a compiled golang binary that reuses the plugin's existing golang property getters, so every raw, global and computed key is unchanged while collection runs in parallel and json is marshalled directly. The global report keeps its existing behaviour of surfacing only the global keys.
This commit is contained in:
@@ -1,7 +1,15 @@
|
||||
GOARCH ?= amd64
|
||||
BUILD = pagesize nginx-property
|
||||
TRIGGERS = triggers/report
|
||||
BUILD = pagesize nginx-property report-subcommand triggers
|
||||
PLUGIN_NAME = nginx-vhosts
|
||||
|
||||
clean-report-subcommand:
|
||||
rm -rf report-subcommand
|
||||
|
||||
report-subcommand: clean-report-subcommand src/subcommands/subcommands.go
|
||||
GOARCH=$(GOARCH) go build -mod=readonly -ldflags="-s -w" $(GO_ARGS) -o report-subcommand src/subcommands/subcommands.go
|
||||
ln -sf ../report-subcommand subcommands/report
|
||||
|
||||
clean-pagesize:
|
||||
rm -rf pagesize
|
||||
|
||||
|
||||
Reference in New Issue
Block a user