2022-06-14 07:20:13 +00:00
|
|
|
package schema
|
|
|
|
|
|
|
|
import (
|
2023-05-07 05:48:26 +00:00
|
|
|
"net/url"
|
2022-08-08 21:50:12 +00:00
|
|
|
"time"
|
2022-06-14 07:20:13 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// TelemetryConfig represents the telemetry config.
|
|
|
|
type TelemetryConfig struct {
|
|
|
|
Metrics TelemetryMetricsConfig `koanf:"metrics"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// TelemetryMetricsConfig represents the telemetry metrics config.
|
|
|
|
type TelemetryMetricsConfig struct {
|
2023-05-09 11:25:56 +00:00
|
|
|
Enabled bool `koanf:"enabled"`
|
|
|
|
Address *AddressTCP `koanf:"address"`
|
2022-08-08 21:50:12 +00:00
|
|
|
Buffers ServerBuffers `koanf:"buffers"`
|
|
|
|
Timeouts ServerTimeouts `koanf:"timeouts"`
|
2022-06-14 07:20:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// DefaultTelemetryConfig is the default telemetry configuration.
|
|
|
|
var DefaultTelemetryConfig = TelemetryConfig{
|
|
|
|
Metrics: TelemetryMetricsConfig{
|
2023-05-09 11:25:56 +00:00
|
|
|
Address: &AddressTCP{Address{true, false, -1, 9959, &url.URL{Scheme: AddressSchemeTCP, Host: ":9959"}}},
|
2022-08-08 21:50:12 +00:00
|
|
|
Buffers: ServerBuffers{
|
|
|
|
Read: 4096,
|
|
|
|
Write: 4096,
|
|
|
|
},
|
|
|
|
Timeouts: ServerTimeouts{
|
2022-10-07 02:52:01 +00:00
|
|
|
Read: time.Second * 6,
|
|
|
|
Write: time.Second * 6,
|
2022-08-08 21:50:12 +00:00
|
|
|
Idle: time.Second * 30,
|
|
|
|
},
|
2022-06-14 07:20:13 +00:00
|
|
|
},
|
|
|
|
}
|