Add a constant with default shutdown wait time (#1338)

We have in situ constants, which are not always consistent.
This commit is contained in:
Victor Agababov 2020-05-15 10:47:01 -07:00 committed by GitHub
parent 58d464a29e
commit 4419e613c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -36,6 +36,12 @@ const (
// We should consider exposing this as a configuration.
DefaultConnTimeout = 200 * time.Millisecond
// DefaultDrainTimeout is the time that Knative components on the data
// path will wait before shutting down server, but after starting to fail
// readiness probes to ensure network layer propagation and so that no requests
// are routed to this pod.
DefaultDrainTimeout = 30 * time.Second
// UserAgentKey is the constant for header "User-Agent".
UserAgentKey = "User-Agent"