Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidPathName ¶
IsValidPathName checks if a path name is valid.
Types ¶
type AuthMethods ¶
type AuthMethods []headers.AuthMethod
AuthMethods is the authMethods parameter.
func (AuthMethods) MarshalJSON ¶
func (d AuthMethods) MarshalJSON() ([]byte, error)
MarshalJSON marshals a AuthMethods into JSON.
func (*AuthMethods) UnmarshalJSON ¶
func (d *AuthMethods) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals a AuthMethods from JSON.
type Conf ¶
type Conf struct { // general LogLevel LogLevel `json:"logLevel"` LogDestinations LogDestinations `json:"logDestinations"` LogFile string `json:"logFile"` ReadTimeout StringDuration `json:"readTimeout"` WriteTimeout StringDuration `json:"writeTimeout"` ReadBufferCount int `json:"readBufferCount"` ExternalAuthenticationURL string `json:"externalAuthenticationURL"` API bool `json:"api"` APIAddress string `json:"apiAddress"` Metrics bool `json:"metrics"` MetricsAddress string `json:"metricsAddress"` PPROF bool `json:"pprof"` PPROFAddress string `json:"pprofAddress"` RunOnConnect string `json:"runOnConnect"` RunOnConnectRestart bool `json:"runOnConnectRestart"` // RTSP RTSPDisable bool `json:"rtspDisable"` Protocols Protocols `json:"protocols"` Encryption Encryption `json:"encryption"` RTSPAddress string `json:"rtspAddress"` RTSPSAddress string `json:"rtspsAddress"` RTPAddress string `json:"rtpAddress"` RTCPAddress string `json:"rtcpAddress"` MulticastIPRange string `json:"multicastIPRange"` MulticastRTPPort int `json:"multicastRTPPort"` MulticastRTCPPort int `json:"multicastRTCPPort"` ServerKey string `json:"serverKey"` ServerCert string `json:"serverCert"` AuthMethods AuthMethods `json:"authMethods"` ReadBufferSize int `json:"readBufferSize"` // RTMP RTMPDisable bool `json:"rtmpDisable"` RTMPAddress string `json:"rtmpAddress"` // HLS HLSDisable bool `json:"hlsDisable"` HLSAddress string `json:"hlsAddress"` HLSAlwaysRemux bool `json:"hlsAlwaysRemux"` HLSSegmentCount int `json:"hlsSegmentCount"` HLSSegmentDuration StringDuration `json:"hlsSegmentDuration"` HLSSegmentMaxSize StringSize `json:"hlsSegmentMaxSize"` HLSAllowOrigin string `json:"hlsAllowOrigin"` // paths Paths map[string]*PathConf `json:"paths"` }
Conf 配置对象
func (*Conf) CheckAndFillMissing ¶
CheckAndFillMissing 检查并填充缺失值
type Credential ¶
type Credential string
Credential is a parameter that is used as username or password.
func (Credential) MarshalJSON ¶
func (d Credential) MarshalJSON() ([]byte, error)
MarshalJSON marshals a Credential into JSON.
func (*Credential) UnmarshalJSON ¶
func (d *Credential) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals a Credential from JSON.
type Encryption ¶
type Encryption int
Encryption is the encryption parameter.
const ( EncryptionNo Encryption = iota EncryptionOptional EncryptionStrict )
supported encryption policies.
func (Encryption) MarshalJSON ¶
func (d Encryption) MarshalJSON() ([]byte, error)
MarshalJSON marshals a Encryption into JSON.
func (*Encryption) UnmarshalJSON ¶
func (d *Encryption) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals a Encryption from JSON.
type IPsOrNets ¶
type IPsOrNets []interface{}
IPsOrNets is a parameter that acceps IPs or subnets.
func (IPsOrNets) MarshalJSON ¶
MarshalJSON marshals a IPsOrNets into JSON.
func (*IPsOrNets) UnmarshalJSON ¶
UnmarshalJSON unmarshals a IPsOrNets from JSON.
type LogDestinations ¶
type LogDestinations map[logger.Destination]struct{}
LogDestinations is the logDestionations parameter.
func (LogDestinations) MarshalJSON ¶
func (d LogDestinations) MarshalJSON() ([]byte, error)
MarshalJSON marshals a LogDestinations into JSON.
func (*LogDestinations) UnmarshalJSON ¶
func (d *LogDestinations) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals a LogDestinations from JSON.
type LogLevel ¶
LogLevel is the logLevel parameter.
func (LogLevel) MarshalJSON ¶
MarshalJSON marshals a LogLevel into JSON.
func (*LogLevel) UnmarshalJSON ¶
UnmarshalJSON unmarshals a LogLevel from JSON.
type PathConf ¶
type PathConf struct { Regexp *regexp.Regexp `json:"-"` // source Source string `json:"source"` SourceProtocol SourceProtocol `json:"sourceProtocol"` SourceAnyPortEnable bool `json:"sourceAnyPortEnable"` SourceFingerprint string `json:"sourceFingerprint"` SourceOnDemand bool `json:"sourceOnDemand"` SourceOnDemandStartTimeout StringDuration `json:"sourceOnDemandStartTimeout"` SourceOnDemandCloseAfter StringDuration `json:"sourceOnDemandCloseAfter"` SourceRedirect string `json:"sourceRedirect"` DisablePublisherOverride bool `json:"disablePublisherOverride"` Fallback string `json:"fallback"` // authentication PublishUser Credential `json:"publishUser"` PublishPass Credential `json:"publishPass"` PublishIPs IPsOrNets `json:"publishIPs"` ReadUser Credential `json:"readUser"` ReadPass Credential `json:"readPass"` ReadIPs IPsOrNets `json:"readIPs"` // external commands RunOnInit string `json:"runOnInit"` RunOnInitRestart bool `json:"runOnInitRestart"` RunOnDemand string `json:"runOnDemand"` RunOnDemandRestart bool `json:"runOnDemandRestart"` RunOnDemandStartTimeout StringDuration `json:"runOnDemandStartTimeout"` RunOnDemandCloseAfter StringDuration `json:"runOnDemandCloseAfter"` RunOnReady string `json:"runOnReady"` RunOnReadyRestart bool `json:"runOnReadyRestart"` RunOnRead string `json:"runOnRead"` RunOnReadRestart bool `json:"runOnReadRestart"` // deprecated, replaced by runOnReady. TODO: remove in next version RunOnPublish string `json:"runOnPublish"` RunOnPublishRestart bool `json:"runOnPublishRestart"` }
PathConf is a path configuration.
type Protocols ¶
type Protocols map[Protocol]struct{}
Protocols is the protocols parameter.
func (Protocols) MarshalJSON ¶
MarshalJSON marshals a Protocols into JSON.
func (*Protocols) UnmarshalJSON ¶
UnmarshalJSON unmarshals a Protocols from JSON.
type SourceProtocol ¶
SourceProtocol is the sourceProtocol parameter.
func (SourceProtocol) MarshalJSON ¶
func (d SourceProtocol) MarshalJSON() ([]byte, error)
MarshalJSON marshals a SourceProtocol into JSON.
func (*SourceProtocol) UnmarshalJSON ¶
func (d *SourceProtocol) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals a SourceProtocol from JSON.
type StringDuration ¶
StringDuration is a duration that is unmarshaled from a string. Durations are normally unmarshaled from numbers.
func (StringDuration) MarshalJSON ¶
func (d StringDuration) MarshalJSON() ([]byte, error)
MarshalJSON marshals a StringDuration into JSON.
func (*StringDuration) UnmarshalJSON ¶
func (d *StringDuration) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals a StringDuration from JSON.
type StringSize ¶
type StringSize uint64
StringSize is a size that is unmarshaled from a string.
func (StringSize) MarshalJSON ¶
func (s StringSize) MarshalJSON() ([]byte, error)
MarshalJSON marshals a StringSize into JSON.
func (*StringSize) UnmarshalJSON ¶
func (s *StringSize) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals a StringSize from JSON.