Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Name is a unique node name (across all regions). // It is not a host name. // It's typically of the form "1b", "2a", "3b", etc. (region // ID + suffix within that region) Name string `yaml:"name"` // Region is the Region of the RelayRegion that this node // is running in. Region string `yaml:"region"` // Host describes the host information about the relay server. Host string `yaml:"host,omitempty"` Port int `yaml:"port,omitempty"` // Port optionally specifies a STUN port to use. // Zero means 3478. // To disable STUN on this node, use -1. // https://datatracker.ietf.org/doc/html/rfc5389#section-18.4 STUNPort int `yaml:"stunPort,omitempty"` DHKey *security.DHKey `yaml:"dhKey"` Portal *Portal `yaml:"portal"` }
Config represents the configuration of the relay server
func FromReader ¶
FromReader returns the configuration instance from reader
type Portal ¶
type Portal struct { Key string `yaml:"key"` URL string `yaml:"url"` // Keepalive interval between portal/relay services. KeepaliveInterval time.Duration `yaml:"keepaliveInterval,omitempty"` // Sync peer online status after a sync interval. SyncInterval time.Duration `yaml:"syncInterval,omitempty"` }
Portal represents the gateway instance configuration
Click to show internal directories.
Click to hide internal directories.