54 Commits

Author SHA1 Message Date
Suika
54c89b6742 docs stop maintenance 2022-04-11 21:15:44 +08:00
Guilherme Salazar
710369b5ac chore(*) add deprecation notice (#51) 2022-02-23 22:43:13 +01:00
Guilherme Salazar
23e2979fa3 tests(*) new plugin name 2022-02-15 13:07:13 -03:00
Vinicius Mignot
857bc71bd9 Merge pull request #42 from Kong/chore/bump-go-pdk-v0.6.0
bump go-pdk v0.6.0
2021-01-09 00:08:34 -03:00
Javier Guerra
56cfa979b7 bump go-pdk v0.6.0 v0.6.1 v0.6.0 2021-01-08 21:50:16 -05:00
Javier Guerra
c7b9559e0c New release required for multiple-pluginserver 2020-12-07 21:27:28 -05:00
Javier
660ca5dc4b Merge pull request #38 from Kong/feat/dump-all-plugins
new CLI option `dump-all-plugins`
2020-12-04 11:22:17 -05:00
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
Guilherme Salazar
a443f0493c release: 0.5.0 v0.5.0 v0.5.1 2020-06-22 11:51:41 -03:00
Javier
9cd14d59ec feat(*) add response phase (#32) 2020-06-22 11:40:57 -03:00
Melchor Garau Madrigal
c1ee697a37 fix(config) correctly encode map config 2020-06-22 11:20:43 -03:00
longquan0104
1c780470b5 fix(config) correctly encode array config (#20) 2020-06-22 11:16:28 -03:00
Guilherme Salazar
ed5ed2d9e7 release: 0.5.0 2020-06-17 11:40:27 -03:00
Javier
60ba6bd20c feat(*) add back header and body filter phases (#31) 2020-06-17 11:34:53 -03:00
Guilherme Salazar
a34aced54e release: v0.4.0
- Bump go-pdk to v0.5.0
v0.4.0
2020-05-27 13:28:03 -03:00
Guilherme Salazar
bbb540239e chore(deps) bump go-pdk to v0.4.0 v0.3.3 2020-05-25 12:48:13 -03:00
Guilherme Salazar
08b5949900 chore(deps) bump go-pdk to v0.3.1 v0.3.2 2020-05-11 08:17:30 -07:00
Guilherme Salazar
5dbb1a99b4 docs(*) add changelog 2020-05-11 08:17:30 -07:00
Jean-Philippe Courson
7e6c31a68e fix(schema) properly handle array fields (#18) 2020-05-11 09:57:23 -03:00
Javier
9dd9b0ffec fix(*) handle closed channel to allow plugins to terminate processing (#16) 2020-01-24 15:20:04 -08:00
Javier
dec2701f43 Merge pull request #15 from karuppiah7890/fix-version-priority-issue
fix(*) reading of version and priority from plugin code
2020-01-23 10:23:45 -05:00
Karuppiah Natarajan
49d044a011 fix(*) reading of version and priority from plugin code
Fixes #14
2020-01-22 21:39:21 +05:30
Guilherme Salazar
b008f8f37f chore(*) add go mod and pin go-pdk v0.3.0 2020-01-20 16:39:33 -08:00
Javier
e266b887cc feat(rpc) new RPC method accepts a map of string arrays (#12) 2020-01-20 11:29:15 -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 0.2.0 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
Hisham Muhammad
53790d0342 chore(ci) run test.sh on CI 2019-12-23 09:40:16 -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
Hisham Muhammad
65e79d9937 docs(readme) fix typo 0.1.0 2019-12-16 13:02:20 -08:00
Hisham Muhammad
aba3dd5b68 fix(server) remove header_filter and body_filter handling for now
Remove filter phases for now, because those can't be handled efficiently
by the Kong side: one cannot open non-blocking sockets in `header_filter`
and `body_filter` so we avoid those phases when doing Go plugins to avoid
using blocking sockets.
2019-12-16 13:02:20 -08:00
Guilherme Salazar
77057d1f51 refactor(main) flag parsing and validation in init 2019-12-12 15:05:03 -08:00
Guilherme Salazar
8daa26cfda chore(git) add gitignore 0.0.1 2019-12-11 14:16:51 -08:00
Guilherme Salazar
266274945f chore(*) add makefile 2019-12-11 14:16:51 -08:00
Guilherme Salazar
95eefbd75a chore(ci) add travis file (#2) 2019-12-11 14:16:51 -08:00
Javier Guerra
2345dc45e4 feat(socket) remove stale socket on entry 2019-12-11 14:16:51 -08:00
Javier Guerra
21590e99d6 fix(threading) use a pointer to lock the mutex 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
b59c19779f fix(*) pass pointers to share lock
Also lock the plugin when doing symbol lookup.
2019-12-11 14:16:51 -08:00
Javier Guerra
bff605d63c return EventId on every Step 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
Javier Guerra
1af48ef618 docs(*) add apache license 2019-12-11 14:16:51 -08:00
Javier Guerra
62e4f58624 docs(*) add README 2019-12-11 14:16:51 -08:00
Javier Guerra
251d8ad9d2 docs(*) add doc comments 2019-12-11 14:16:51 -08:00
Javier Guerra
db0d11e5ae refactor(*) reorder according to lifespan 2019-12-11 14:16:47 -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