Documentation
¶
Index ¶
Constants ¶
const ( // DefaultListenAddr is the default listen address for the server. DefaultListenAddr = "localhost:50051" // TLSMinVersion is the minimum required version of TLS. TLSMinVersion = tls.VersionTLS13 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ListenAddr string `yaml:"listenAddr,omitempty"`
Host string `yaml:"host,omitempty"`
TLS *TLS `yaml:"tls,omitempty"`
LogFile LogFile `yaml:"logfile"`
Sources Sources `yaml:"sources"`
Destinations []Destination `yaml:"destinations"`
}
Config holds the configuration for the application.
type ConfigDirFunc ¶
ConfigDirFunc is a function that returns the user configuration directory.
type Destination ¶
Destination holds the configuration for a destination.
type LogFile ¶
type LogFile struct {
Enabled bool `yaml:"enabled"`
Path string `yaml:"path,omitempty"`
// contains filtered or unexported fields
}
LogFile holds the configuration for the log file.
type MediaServerSource ¶ added in v0.0.8
type MediaServerSource struct {
StreamKey string `yaml:"streamKey,omitempty"`
RTMP RTMPSource `yaml:"rtmp"`
RTMPS RTMPSource `yaml:"rtmps"`
}
MediaServerSource holds the configuration for the media server source.
type RTMPSource ¶
RTMPSource holds the configuration for the RTMP source.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides configuration services.
func NewDefaultService ¶
NewDefaultService creates a new service with the default configuration file location.
func NewService ¶
func NewService(configDirFunc ConfigDirFunc, chanSize int) (*Service, error)
NewService creates a new service with provided ConfigDirFunc.
The app data directories (config and state) are created if they do not exist.
func (*Service) C ¶ added in v0.0.3
C returns a channel that receives configuration updates.
The channel is never closed.
func (*Service) Current ¶ added in v0.0.3
Current returns the current configuration.
This will be the last-loaded or last-updated configuration, or a default configuration if nothing else is available.
func (*Service) ReadOrCreateConfig ¶
ReadOrCreateConfig reads the configuration from the file or creates it with default values.
type Sources ¶
type Sources struct {
MediaServer MediaServerSource `yaml:"mediaServer"`
}
Sources holds the configuration for the sources.