config

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2023 License: BSD-4-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RelayServerConfig  RelayConfig  `yaml:"relay_config"`
	WsServerConfig     WsConfig     `yaml:"wsserver_config"`
	RedisServerConfig  RedisConfig  `yaml:"redis_config"`
	MetricServerConfig MetricConfig `yaml:"metric_config"`
}

func LoadConfig

func LoadConfig(configPath string) Config

type MetricConfig

type MetricConfig struct {
	Enable bool   `yaml:"enable"`
	Listen string `yaml:"listen"`
}

type RedisConfig

type RedisConfig struct {
	ServerAddr string `yaml:"server_addr"`
	Password   string `yaml:"password"`
}

type RelayConfig

type RelayConfig struct {
	Version string `yaml:"version"`
	Mode    string `yaml:"mode"`

	Listen                      string `yaml:"listen"`
	GracefulShutdownWaitSeconds int    `yaml:"graceful_shutdown_wait_seconds"`
}

type WsConfig

type WsConfig struct {
	HeartbeatInterval          int      `yaml:"heartbeat_interval"`            // in seconds
	CheckSessionExpireInterval int      `yaml:"check_session_expire_interval"` // in seconds
	PendingSessionCacheTime    int      `yaml:"pending_session_cache_time"`    // in seconds
	MessageCacheTime           int      `yaml:"message_cache_time"`            //
	AllowedOrigins             []string `yaml:"allowed_origins"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL