Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion pkg/activator/net/revision_backends.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"net"
"net/http"
"net/url"
"os"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -87,10 +88,20 @@ func (d dests) MarshalLogObject(enc zapcore.ObjectEncoder) error {
}

const (
probeTimeout time.Duration = 300 * time.Millisecond
defaultProbeTimeout time.Duration = 300 * time.Millisecond
defaultProbeFrequency time.Duration = 200 * time.Millisecond
)

var (
probeTimeout = func() time.Duration {
val := os.Getenv("PROBE_TIMEOUT_MS")
if ms, err := strconv.Atoi(val); err == nil && ms > 0 {
return time.Duration(ms) * time.Millisecond
}
return defaultProbeTimeout
}()
)

// revisionWatcher watches the podIPs and ClusterIP of the service for a revision. It implements the logic
// to supply revisionDestsUpdate events on updateCh
type revisionWatcher struct {
Expand Down
Loading