2022-11-10 13:14:57 -05:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
2023-02-02 17:15:17 -08:00
|
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
|
|
2021-08-18 15:30:55 +02:00
|
|
|
package common
|
|
|
|
|
|
2022-11-10 13:14:57 -05:00
|
|
|
import (
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
"github.com/hashicorp/boundary/internal/server"
|
|
|
|
|
)
|
2021-08-18 15:30:55 +02:00
|
|
|
|
|
|
|
|
// In the future we could make this configurable
|
|
|
|
|
const (
|
2025-01-09 10:26:37 -08:00
|
|
|
// SessionInfoInterval is the base duration used in the calculation of the random backoff
|
|
|
|
|
// during the worker session information report
|
|
|
|
|
SessionInfoInterval = 2 * time.Second
|
2021-08-18 15:30:55 +02:00
|
|
|
|
2025-01-09 10:26:37 -08:00
|
|
|
// RoutingInfoInterval is the interval at which the worker will send routing information
|
|
|
|
|
// to the controller
|
|
|
|
|
RoutingInfoInterval = 10 * time.Second
|
|
|
|
|
|
|
|
|
|
// StatisticsInterval is the base duration used in the calculation of the random backoff
|
|
|
|
|
// during the worker statistics report
|
|
|
|
|
StatisticsInterval = 15 * time.Second
|
|
|
|
|
|
|
|
|
|
// DefaultSessionInfoTimeout is the timeout duration on SessionInfo calls to the controller from
|
|
|
|
|
// the worker
|
|
|
|
|
DefaultSessionInfoTimeout = server.DefaultLiveness / 3
|
|
|
|
|
|
|
|
|
|
// DefaultRoutingInfoTimeout is the timeout duration on routing info calls to the controller from
|
|
|
|
|
// the worker
|
|
|
|
|
DefaultRoutingInfoTimeout = server.DefaultLiveness / 2
|
|
|
|
|
|
|
|
|
|
// DefaultStatisticsTimeout is the timeout duration on Statistics calls to the controller from
|
2021-08-18 15:30:55 +02:00
|
|
|
// the worker
|
2025-01-09 10:26:37 -08:00
|
|
|
DefaultStatisticsTimeout = server.DefaultLiveness
|
2021-08-18 15:30:55 +02:00
|
|
|
)
|