Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPathName ¶
CheckPathName checks if a path name is valid.
Types ¶
type Conf ¶
type Conf struct { // general LogLevel string `yaml:"logLevel"` LogLevelParsed logger.Level `yaml:"-" json:"-"` LogDestinations []string `yaml:"logDestinations"` LogDestinationsParsed map[logger.Destination]struct{} `yaml:"-" json:"-"` LogFile string `yaml:"logFile"` ListenIP string `yaml:"listenIP"` ReadTimeout time.Duration `yaml:"readTimeout"` WriteTimeout time.Duration `yaml:"writeTimeout"` ReadBufferCount int `yaml:"readBufferCount"` Metrics bool `yaml:"metrics"` MetricsPort int `yaml:"metricsPort"` Pprof bool `yaml:"pprof"` RunOnConnect string `yaml:"runOnConnect"` RunOnConnectRestart bool `yaml:"runOnConnectRestart"` // rtsp RTSPDisable bool `yaml:"rtspDisable"` Protocols []string `yaml:"protocols"` ProtocolsParsed map[gortsplib.StreamProtocol]struct{} `yaml:"-" json:"-"` Encryption string `yaml:"encryption"` EncryptionParsed Encryption `yaml:"-" json:"-"` RTSPPort int `yaml:"rtspPort"` RTSPSPort int `yaml:"rtspsPort"` RTPPort int `yaml:"rtpPort"` RTCPPort int `yaml:"rtcpPort"` ServerKey string `yaml:"serverKey"` ServerCert string `yaml:"serverCert"` AuthMethods []string `yaml:"authMethods"` AuthMethodsParsed []headers.AuthMethod `yaml:"-" json:"-"` ReadBufferSize int `yaml:"readBufferSize"` // rtmp RTMPDisable bool `yaml:"rtmpDisable"` RTMPPort int `yaml:"rtmpPort"` // path Paths map[string]*PathConf `yaml:"paths"` }
Conf is the main program configuration.
type Encryption ¶
type Encryption int
Encryption is an encryption policy.
const ( EncryptionNo Encryption = iota EncryptionOptional EncryptionStrict )
encryption policies.
type PathConf ¶
type PathConf struct { Regexp *regexp.Regexp `yaml:"-" json:"-"` Source string `yaml:"source"` SourceProtocol string `yaml:"sourceProtocol"` SourceProtocolParsed *gortsplib.StreamProtocol `yaml:"-" json:"-"` SourceOnDemand bool `yaml:"sourceOnDemand"` SourceOnDemandStartTimeout time.Duration `yaml:"sourceOnDemandStartTimeout"` SourceOnDemandCloseAfter time.Duration `yaml:"sourceOnDemandCloseAfter"` SourceRedirect string `yaml:"sourceRedirect"` Fallback string `yaml:"fallback"` RunOnInit string `yaml:"runOnInit"` RunOnInitRestart bool `yaml:"runOnInitRestart"` RunOnDemand string `yaml:"runOnDemand"` RunOnDemandRestart bool `yaml:"runOnDemandRestart"` RunOnDemandStartTimeout time.Duration `yaml:"runOnDemandStartTimeout"` RunOnDemandCloseAfter time.Duration `yaml:"runOnDemandCloseAfter"` RunOnPublish string `yaml:"runOnPublish"` RunOnPublishRestart bool `yaml:"runOnPublishRestart"` RunOnRead string `yaml:"runOnRead"` RunOnReadRestart bool `yaml:"runOnReadRestart"` PublishUser string `yaml:"publishUser"` PublishPass string `yaml:"publishPass"` PublishIps []string `yaml:"publishIps"` PublishIpsParsed []interface{} `yaml:"-" json:"-"` ReadUser string `yaml:"readUser"` ReadPass string `yaml:"readPass"` ReadIps []string `yaml:"readIps"` ReadIpsParsed []interface{} `yaml:"-" json:"-"` }
PathConf is a path configuration.
Click to show internal directories.
Click to hide internal directories.