add psrpc room service (#2171)

* add psrpc room service

* update deps

* disable by default

* feedback

* config

* test
This commit is contained in:
Paul Wells
2023-10-22 22:49:38 -07:00
committed by GitHub
parent 08997c96b0
commit 325e5ca753
17 changed files with 401 additions and 143 deletions
+15
View File
@@ -71,6 +71,7 @@ type Config struct {
Keys map[string]string `yaml:"keys,omitempty"`
Region string `yaml:"region,omitempty"`
SignalRelay SignalRelayConfig `yaml:"signal_relay,omitempty"`
PSRPC PSRPCConfig `yaml:"psrpc,omitempty"`
// LogLevel is deprecated
LogLevel string `yaml:"log_level,omitempty"`
Logging LoggingConfig `yaml:"logging,omitempty"`
@@ -269,6 +270,14 @@ type SignalRelayConfig struct {
StreamBufferSize int `yaml:"stream_buffer_size,omitempty"`
}
type PSRPCConfig struct {
Enable bool `yaml:"enable,omitempty"`
MaxAttempts int `yaml:"retry_attempts,omitempty"`
Timeout time.Duration `yaml:"retry_timeout,omitempty"`
Backoff time.Duration `yaml:"retry_backoff,omitempty"`
BufferSize int `yaml:"stream_buffer_size,omitempty"`
}
// RegionConfig lists available regions and their latitude/longitude, so the selector would prefer
// regions that are closer
type RegionConfig struct {
@@ -484,6 +493,12 @@ var DefaultConfig = Config{
MaxRetryInterval: 4 * time.Second,
StreamBufferSize: 1000,
},
PSRPC: PSRPCConfig{
MaxAttempts: 3,
Timeout: 500 * time.Millisecond,
Backoff: 500 * time.Millisecond,
BufferSize: 1000,
},
Keys: map[string]string{},
}