Commit Graph

8 Commits

Author SHA1 Message Date
Guilherme Salazar
23e2979fa3 tests(*) new plugin name 2022-02-15 13:07:13 -03: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
Hisham Muhammad
aeebdd2425 tests(*) update test to use two plugins and use ncat
There are several incompatible versions of netcat around.
`ncat` (from nmap) is a more "reliable" tool for scripting.

Extends the test a bit with the latest change in
https://github.com/kong/go-plugins, where the example
plugin was split in two.
2019-12-23 09:40:16 -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
8777138bdd feat(*) start goroutine per event 2019-12-11 14:16:05 -08:00
Javier Guerra
0027a3b027 feat(*) working Step()
TODOs:
 - decode the in & out parameters (method + params) together on the RPC object.  currently they're a single string because the go-pdk expects a string channel
 - the instance goroutine finishes after a single event, should stay until the instance is closed
2019-12-11 14:11:18 -08:00
Javier Guerra
ca3b80fff1 handlers are bound to config, so have to live in the instance struct 2019-12-11 14:11:18 -08:00
Javier Guerra
8bebb13883 tests(*) add test script 2019-12-11 14:11:14 -08:00