Rename root, api and sdk module paths (imports, go.mod, go_package, ldflags, build scripts, buf configs) and regenerate protobuf/gateway code with the project's pinned toolchain. Wire identifiers unchanged. api gets a local replace for sdk; root/api/sdk require v0.1.0. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
38 lines
1.2 KiB
Go
38 lines
1.2 KiB
Go
// Copyright IBM Corp. 2020, 2026
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package common
|
|
|
|
import (
|
|
"time"
|
|
|
|
"repo.anhonesthost.net/CyberCoveLLC/threshold/internal/server"
|
|
)
|
|
|
|
// In the future we could make this configurable
|
|
const (
|
|
// SessionInfoInterval is the base duration used in the calculation of the random backoff
|
|
// during the worker session information report
|
|
SessionInfoInterval = 2 * time.Second
|
|
|
|
// 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
|
|
// the worker
|
|
DefaultStatisticsTimeout = server.DefaultLiveness
|
|
)
|