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>
This commit is contained in:
Lucas Roesler
2019-06-22 21:47:02 +02:00
committed by Alex Ellis
parent db6628d1a5
commit 6df51a3516
2 changed files with 5 additions and 3 deletions

View File

@ -113,7 +113,7 @@ func main() {
forwardingNotifiers,
)
faasHandlers.LogProxyHandler = handlers.NewLogHandlerFunc(*config.LogsProviderURL)
faasHandlers.LogProxyHandler = handlers.NewLogHandlerFunc(*config.LogsProviderURL, config.WriteTimeout)
if config.UseNATS() {
log.Println("Async enabled: Using NATS Streaming.")