Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version string = "dev" WebVersion string = "dev" GitCommit string )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Global Global GlobalConfig `yaml:"global"` // Log Log LogConfig `yaml:"log"` // Server Server ServerConfig `yaml:"server"` // Jwt Jwt JwtConfig `yaml:"jwt"` // Rtmp Rtmp RtmpConfig `yaml:"rtmp" hc:"you can use rtmp to publish live"` // Proxy Proxy ProxyConfig `` /* 126-byte string literal not displayed */ }
var (
Conf *Config
)
func DefaultConfig ¶
func DefaultConfig() *Config
type GlobalConfig ¶
type GlobalConfig struct { }
func DefaultGlobalConfig ¶
func DefaultGlobalConfig() GlobalConfig
type JwtConfig ¶
type JwtConfig struct { Secret string `yaml:"secret" lc:"jwt secret (default rand string)" env:"JWT_SECRET"` Expire int `yaml:"expire" lc:"expire time (default: 12 hour)" env:"JWT_EXPIRE"` }
func DefaultJwtConfig ¶
func DefaultJwtConfig() JwtConfig
type LogConfig ¶
type LogConfig struct { Enable bool `yaml:"enable" lc:"enable log to file (default: true)" env:"LOG_ENABLE"` LogFormat string `yaml:"log_format" lc:"log format, can be set: text | json (default: text)" env:"LOG_FORMAT"` FilePath string `yaml:"file_path" lc:"log file path (default: log/log.log)" env:"LOG_FILE_PATH"` MaxSize int `yaml:"max_size" lc:"max size per log file (default: 10 megabytes)" env:"LOG_MAX_SIZE"` MaxBackups int `yaml:"max_backups" lc:"max backups (default: 10)" env:"LOG_MAX_BACKUPS"` MaxAge int `yaml:"max_age" lc:"max age (default: 28 days)" env:"LOG_MAX_AGE"` Compress bool `yaml:"compress" lc:"compress (default: false)" env:"LOG_COMPRESS"` }
func DefaultLogConfig ¶
func DefaultLogConfig() LogConfig
type ProxyConfig ¶
type ProxyConfig struct { MovieProxy bool `yaml:"movie_proxy" lc:"enable movie proxy (default: true)" env:"PROXY_MOVIE_PROXY"` LiveProxy bool `yaml:"live_proxy" lc:"enable live proxy (default: true)" env:"PROXY_LIVE_PROXY"` }
func DefaultProxyConfig ¶
func DefaultProxyConfig() ProxyConfig
type RtmpConfig ¶
type RtmpConfig struct { Enable bool `yaml:"enable" lc:"enable rtmp server (default: true)" env:"RTMP_ENABLE"` Port uint16 `yaml:"port" lc:"rtmp server port (default use server port)" env:"RTMP_PORT"` CustomPublishHost string `yaml:"custom_publish_host" lc:"publish host (default use http header host)" env:"RTMP_CUSTOM_PUBLISH_HOST"` RtmpPlayer bool `yaml:"rtmp_player" lc:"enable rtmp player (default: false)" env:"RTMP_PLAYER"` HlsPlayer bool `yaml:"hls_player" lc:"enable hls player (default: false)" env:"HLS_PLAYER"` }
func DefaultRtmpConfig ¶
func DefaultRtmpConfig() RtmpConfig
type ServerConfig ¶
type ServerConfig struct { Listen string `yaml:"listen" lc:"server listen addr" env:"SERVER_LISTEN"` Port uint16 `yaml:"port" lc:"server listen port" env:"SERVER_PORT"` Quic bool `yaml:"quic" lc:"enable http3/quic, need enable ssl, set cert and key file (default: true)" env:"SERVER_QUIC"` CertPath string `yaml:"cert_path" lc:"cert path" env:"SERVER_CERT_PATH"` KeyPath string `yaml:"key_path" lc:"key path" env:"SERVER_KEY_PATH"` }
func DefaultServerConfig ¶
func DefaultServerConfig() ServerConfig
Click to show internal directories.
Click to hide internal directories.