12 Commits

Author SHA1 Message Date
Javier Guerra
5aaf044a25 new CLI option dump-all-plugins
allows Kong to know which plugins are manages by a specific instance of
a plugin server.
2020-11-22 17:22:04 -05:00
Javier
9cd14d59ec feat(*) add response phase (#32) 2020-06-22 11:40:57 -03:00
Guilherme Salazar
479ed3f974 feat(*) exit if parent died
Run a goroutine every minute to check if parent died and exit.
Assumption: if parent dies, the process gets adopted by init (pid 1).
2020-01-13 14:37:37 -08:00
Guilherme Salazar
63003ae67a feat(*) add version info 2020-01-08 15:12:45 -08:00
Guilherme Salazar
e9b9a58403 fix(*) exit after dumping plugin info 2020-01-08 14:11:30 -08:00
Javier Guerra
0d2cf25cab feat(cmd) Add CLI command and option to use as a plugin info tool
- -dir <dir>  option sets the starting plugin directory
- -dump <name>  command returns the same data as the `plugin.GetPluginInfo()`
   method.  The result is dumped as a MessagePack object on stdout.
2020-01-07 10:51:09 -08:00
Guilherme Salazar
da8ce4fa7e feat(*) accept kong-prefix instead of socket name
This commit replaces the `-socket` flag with `-kong-prefix` and
hardcodes the socket name, which is expected by Kong to be in the Kong
prefix.
2020-01-06 14:36:00 -08:00
Guilherme Salazar
77057d1f51 refactor(main) flag parsing and validation in init 2019-12-12 15:05:03 -08:00
Javier Guerra
2345dc45e4 feat(socket) remove stale socket on entry 2019-12-11 14:16:51 -08:00
Javier
f8c9246577 refactor(*) no json (#1)
* it runs... something

* use strings for dict keys

* small cleanups / better locking

* add StepXXX RPC methods to express non-primitive PDK return types

* remove commented code

* define recognizable error type

* config schema as a structure, not a string that happens to be decodable

* changed Kong capitalization because of Go

* reread plugin if modified on disk

* docs about event cycle and callback return types

* The standard package can't reload Plugins

* add status report, including some timekeeping

* expire instances after 60sec idle

* a bit of logging

* send PID on status and on connection (as unrequested notification)
2019-12-11 14:16:51 -08:00
Javier Guerra
ca99408e13 refactor(*) stronger concurrency locks 2019-12-11 14:16:51 -08:00
Javier Guerra
9c17f1c76f refactor(*) split for readability
Split event and instance handling code into their own modules.
2019-12-11 14:16:51 -08:00