faas/api-docs
John McCabe 40e1fac1c2 Implement Swarm update handler using PUT
This commit implements an update handler for Docker Swarm, it queries the
current spec, updates values in-situ before calling ServiceUpdate.

The UpdateConfig FailureAction is set to rollback, so in the event of
supplying values to the update that would result in the service failing
then the update will be rolled back.

The UpdateConfig Parallelism param is set to an explicit value of 1 which
will result in functions being updated 1 by 1 rather than all at once.

It also moves the restartDelay declaration out of the create and update
handlers and into the main server function alongside maxRestarts.

And finally this commit uses the PUT HTTP verb for updates rather than
the non-HTTP UPDATE verb which was being used initially (also adding it
to the Swagger definition).

Signed-off-by: John McCabe <john@johnmccabe.net>
2017-09-27 09:58:03 +01:00
..
2017-08-25 10:15:00 +01:00

Exploring or editing the Swagger API documentation

The swagger.yml file can be viewed and edited in the Swagger UI.

  • Head over to the Swagger editor

  • Now click File -> Import URL

  • Type in https://raw.githubusercontent.com/alexellis/faas/master/api-docs/swagger.yml and click OK

You can now view and edit the Swagger, copy back to your fork before pushing changes.