6 Commits

Author SHA1 Message Date
Lucas Roesler
74d08126b3 Handle unexpected statuscodes from the log provider
**What**
- Use NotImplemented when we get a 404 from the log provider.  When we
get a 200, process the log request, as normal.  For all other status
codes, return a sever error with a message stating that the
response was unexpected.  The message will contain the original status
code to assist with debugging

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2019-07-06 10:42:46 +01:00
Lucas Roesler
c28175c4f6 Fix missing imports and tests
**What**
- Fix missing imports since my ide forgot to add the "time" package
- Update the tests to accept the handler timeout duration

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2019-07-06 10:42:46 +01:00
Lucas Roesler
6df51a3516 Use context timeout to cancel the log request
**What**
- Pass the writetimeout to the logs handler to set the context timeout
of the log stream.

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2019-07-06 10:42:46 +01:00
Lucas Roesler
db6628d1a5 Remove Hyjacker log handler
**What**
- Remove the hyjacker based logs handler implementation because it is
not needed

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2019-07-06 10:42:46 +01:00
Lucas Roesler
e07a61fd0c Reimplemnt the logs proxy without hijacking
**What**
- Create an alternative proxy implementation using CloseNotifier and
Flusher

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2019-07-06 10:42:46 +01:00
Lucas Roesler
e7e91ecd15 Implement log proxy handler
**What**
- Implement log handler method that will hijack the connection and clear
timeouts to allow long lived streams
- Proxies requests to the logs provider and returns the response
unmodified

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2019-07-06 10:42:46 +01:00