13 Commits

Author SHA1 Message Date
John McCabe
fac3345668 Use http package consts for http methods
This commit replaces occurences of http method strings with the
corresponding consts from the http package.

*Note* UPDATE is not strictly speaking a valid method and as such isn't
part of the http package (should be a PUT or PATCH?)

Signed-off-by: John McCabe <john@johnmccabe.net>
2018-03-23 16:37:33 +00:00
Vivek Singh
c484eeecdb Add /_/health endpoint to watchdog
Introduce new endpoint `/_/health` to watchdog for health status of
functions  which check for `/tmp/.lock` file

Fixes first part of #547 issue.

Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2018-03-20 08:52:22 +00:00
Alex Ellis (VMware)
30cf8de89b Update combine_output test
Integration test for combine_output should use stat instead of
man as man is not installed in the CI system.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-03-17 21:12:44 +00:00
Alex Ellis (VMware)
3031d0e1c2 Feature: combine_output to control stdout/stderr
This enables an often-requested feature to separate stderr
from stdout within function responses. New flag combine_output is on
by default to match existing behaviour. When combine_output is set
to false it redirects stderr to the container logs rather than
combining it into the function response.

Tested with unit tests for default behaviour and new behaviour.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-03-17 20:59:47 +00:00
Alex Ellis (VMware)
70e9a83e87 Allow override of HTTP port via env-var
HTTP port can now be overriden through use of "port" environmental
variable.

Prefer messaging "want" over "wanted" in error messages, this is more
idiomatic Golang.

Move away from Go ARMv6 (RPi Zero) and give ARMv7 as a minimum
version for release binaries.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-03-17 20:18:09 +00:00
Alex Ellis
33e794abde Add Http_ContentLength for deterministic applications
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-10-29 17:49:20 +00:00
wangguoliang
94a15e44d5 should use strings.Contains() instead of stings.Index()
Signed-off-by: wgliang <liangcszzu@163.com>
2017-09-13 09:55:45 -07:00
Alex
0e723c5b97 watchdog - Patch environmental header test
Signed-off-by: Alex <alexellis2@gmail.com>
2017-08-23 21:13:38 +01:00
Alex Ellis
4d05896798 Watchdog refurbishments
- Watchdog - allow new methods with and without body.
- Enforce hard-timeout via exec_timeout variable.
- Correct bug in timeouts for read/write of HTTP.
- Documentation for new verbs and hard timeout.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-07-07 08:49:11 +01:00
Alex
cc0d351e69 Watchdog - enable forwarding of HTTP headers via CGI-like env vars. 2017-05-09 09:13:42 +01:00
Alex
fbb9646377 Add x-duration-seconds for all functions via watchdog 2017-05-03 18:49:30 +01:00
Alex
569ccbf323 Add license into code files for MIT 2017-04-27 23:21:50 +01:00
Alex
d031e3154e Test makehandler 2017-01-24 20:54:24 +00:00