22 Commits

Author SHA1 Message Date
Denis Makogon
60d2ca234f Ship call logs to the user as text/plain instead of JSON (#615)
* Ship call logs to the user as text/plain instead of JSON

* Fixing swagger doc

* c.String instead of c.JSON

* Make Logs API backward compatible

* Loop over accepted MIME types

* Bump swagger API version

* Fix client build script

 previous version was producing the following "couldn't find a swagger spec"

* Logs API regression test

* Write response body without buffering

* Switch JSON and text/plain cases

* Handle Accepted content types properly

* More solid response content type handling

* Write HTTP 406 with corresponding error body

* Remove unused import

* Use handleErrorResponse
2018-01-02 16:01:22 -06:00
Reed Allman
bb92547b95 Hybrid plumby (#585)
* fix configuration of agent and server to be future proof and plumb in the hybrid client agent

* fixes up the tests, turns off /r/ on api nodes

* fix up defaults for runner nodes

* shove the runner async push code down into agent land to use client

* plumb up async-age

* return full call from async dequeue endpoint, since we're storing a whole
call in the MQ we don't need to worry about caching of app/route [for now]
* fast safe shutdown of dequeue looper in runner / tidying of agent
* nice errors for path not found against /r/, /v1/ or other path not found
* removed some stale TODO in agent
* mq backends are only loud mouths in debug mode now

* update tests

* Add caching to hybrid client

* Fix HTTP error handling in hybrid client.

The type switch was on the value rather than a pointer.

* Gofmt.

* Better caching with a nice caching wrapper

* Remove datastore cache which is now unused

* Don't need to manually wrap interface methods

* Go fmt
2017-12-12 15:54:55 -08:00
Denis Makogon
a7763a6668 Adding java to list of fn_{} bindings (#588) 2017-12-12 12:08:40 -08:00
Reed Allman
2ebc9c7480 hybrid mergy (#581)
* so it begins

* add clarification to /dequeue, change response to list to future proof

* Specify that runner endpoints are also under /v1

* Add a flag to choose operation mode (node type).

This is specified using the `FN_NODE_TYPE` environment variable. The
default is the existing behaviour, where the server supports all
operations (full API plus asynchronous and synchronous runners).

The additional modes are:
* API - the full API is available, but no functions are executed by the
  node. Async calls are placed into a message queue, and synchronous
  calls are not supported (invoking them results in an API error).
* Runner - only the invocation/route API is present. Asynchronous and
  synchronous invocation requests are supported, but asynchronous
  requests are placed onto the message queue, so might be handled by
  another runner.

* Add agent type and checks on Submit

* Sketch of a factored out data access abstraction for api/runner agents

* Fix tests, adding node/agent types to constructors

* Add tests for full, API, and runner server modes.

* Added atomic UpdateCall to datastore

* adds in server side endpoints

* Made ServerNodeType public because tests use it

* Made ServerNodeType public because tests use it

* fix test build

* add hybrid runner client

pretty simple go api client that covers surface area needed for hybrid,
returning structs from models that the agent can use directly. not exactly
sure where to put this, so put it in `/clients/hybrid` but maybe we should
make `/api/runner/client` or something and shove it in there. want to get
integration tests set up and use the real endpoints next and then wrap this up
in the DataAccessLayer stuff.

* gracefully handles errors from fn
* handles backoff & retry on 500s
* will add to existing spans for debuggo action

* minor fixes

* meh
2017-12-11 10:43:19 -08:00
James Jeffrey
c7f3066c75 Update references remove refs to treeder oracle funcy (#376)
* Remove lots of refs to iron and funcy oracle etc..

* more ref replacements

* Replacing more refs. Treeder

* Use Fn not FN
2017-09-29 16:22:15 -07:00
Travis Reeder
9f87b1ead0 Client generator update (#262)
* Generated a bunch of clients.

* Builds go client.

* Removed test line.

* Changed dependencies to fnproject/fn_go

* Fix tests.
2017-09-14 10:57:22 -07:00
Travis Reeder
2040209a90 Updated to api version 0.1.30 2017-08-30 12:45:48 -07:00
Denis Makogon
28e484a370 Updating source to funcy/functions_go 2017-06-06 22:40:48 +03:00
Denis Makogon
1a2a805740 Update functions_{lang} tool to recent git source 2017-06-06 19:50:33 +03:00
Travis Reeder
9cc12b4b12 Remove iron... 2017-05-18 18:59:34 +00:00
Travis Reeder
4b9bba352d Rename location. 2017-05-15 11:00:15 -07:00
Travis Reeder
c0b381eb96 dep ensure instead of dep ensure -update 2017-04-30 13:30:14 -07:00
Travis Reeder
d0ca2f9228 Moved runner into this repo, update dep files and now builds. 2017-04-21 07:42:42 -07:00
Travis Reeder
615ae5c36f Mass s&r: iron-io -> kumokit 2017-04-19 09:49:12 -06:00
Travis Reeder
10f3178ae9 Switching to new dep tool (#616)
* making things work

* #506 - Add ability to login to a private docker registry

* Rolling back "make things work" to test them out more.

* Rolling back "make things work" to test them out more.

* credentials from docker/config.json if ENV is missing

* should get docker auth info just in the init

* update glide lock

* update glide

* Switched to new go dep tool, glide is too frikin annoying.

* Updated circle builds to use dep

* Added GOPATH/bin to path.

* Added GOPATH/bin to path.

* Using regular make test, instead of docker one (not sure why it was using the docker one?).
2017-04-07 11:22:08 -07:00
Travis Reeder
b827135200 Switch to go-swagger for client lib and checks for IRON_TOKEN (#406)
* wip - for review, using go-swagger client and checking for IRON_TOKEN and passing as auth header.

* wip - auth header

* add golang builder

* finish client builder

* change gh username

* fix git command

* update readme and small fixes

* some improvements

* using go-swagger

* fn new client

* revert swagger

* make fn routes and apps work with new client (go-swagger)

* some fixes in fn apps

* update functions_go
2017-01-24 08:08:40 -08:00
Travis Reeder
10030977d9 Client build fixes (#305)
* Some client build fixes.

* Removed tests dir, was for Titan.
2016-11-15 16:40:33 -08:00
C Cirello
c3ffe2ed29 clients: fix API builder (#290) 2016-11-15 06:49:20 -08:00
Carlos C
d5fb1afda7 Revert "Assert License (#224)"
This reverts commit a61c4dab78.
2016-11-06 09:25:12 -08:00
C Cirello
a61c4dab78 Assert License (#224)
* license: assert license for Go code
* license: add in shell scripts
* license: assert license for Ruby code
* license: assert license to individual cases
* license: assert license to Dockerfile
2016-11-05 23:33:07 +01:00
Travis Reeder
0392363e1f Bumped swagger version and fixed client builder. 2016-10-19 13:03:28 -07:00
Travis Reeder
fcde29802e Swagger client generator. (#166) 2016-10-14 11:40:20 -07:00