funker
funker copied to clipboard
Make generic for calling from anywhere
trafficstars
We have handlers and callers for JS and Python. We should have generic. Recommend one of 2 ways (actually both):
- Explicitly expose the API. Let any app know "if I make a network call to the following address with the following parameters, a function will be invoked".
- Create a static binary (probably in go) that know how to make a request and listen to requests.
Allows any container to listen and request, both using a convenient binary and native API.
Related to this, an idea that @justincormack has been working on is being able to also use Funker functions with stdin/out so you can test them on the command-line.
Something like:
$ docker run -i add
{"x": 1, "y": 2}^D
3
or, perhaps:
$ docker run -i add '{"x": 1, "y": 2}'
3
Now that I like. It keeps with the Unix philosophy of text streams, and makes it real easy to compose manually.