Documentation
¶
Index ¶
- func HttpServerStart(port uint16, ssl bool) (uint16, error)
- func RtcServerStart(port uint16) (uint16, error)
- func RtmpServerStart(port uint16, ssl bool) (uint16, error)
- func RtpServerStart(port uint16) (uint16, error)
- func RtspServerStart(port uint16, ssl bool) (uint16, error)
- func SetLog(fileMaxSize, fileMaxCount int)
- func ShellServerStart(port uint16) (uint16, error)
- func SrtServerStart(port uint16) (uint16, error)
- func StopAllServer()
- type Config
- func (conf *Config) Ini() string
- func (conf *Config) IniIsPath() bool
- func (conf *Config) LogFileDays() int
- func (conf *Config) LogFilePath() string
- func (conf *Config) LogLevel() LogLevel
- func (conf *Config) LogMask() LogMask
- func (conf *Config) SetIni(ini string)
- func (conf *Config) SetIniIsPath(iniIsPath bool)
- func (conf *Config) SetLogFileDays(logFileDays int)
- func (conf *Config) SetLogFilePath(logFilePath string)
- func (conf *Config) SetLogLevel(logLevel LogLevel)
- func (conf *Config) SetLogMask(logMask LogMask)
- func (conf *Config) SetSsl(ssl string)
- func (conf *Config) SetSslIsPath(sslIsPath bool)
- func (conf *Config) SetSslPwd(sslPwd string)
- func (conf *Config) SetThreadNum(threadNum int)
- func (conf *Config) Ssl() string
- func (conf *Config) SslIsPath() bool
- func (conf *Config) SslPwd() string
- func (conf *Config) ThreadNum() int
- type LogLevel
- type LogMask
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetLog ¶
func SetLog(fileMaxSize, fileMaxCount int)
SetLog 设置日志文件
fileMaxSize 单个切片文件大小(MB) fileMaxCount 切片文件个数
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func EnvInit ¶
func EnvInit(threadNum int, logLevel LogLevel, logMask LogMask, logFilePath string, logFileDays int, iniIsPath bool, ini string, sslIsPath bool, ssl string, sslPwd string) *Config
EnvInit 初始化环境,调用该库前需要先调用此函数
threadNum: 线程数 logLevel: 日志级别,支持0~4 logMask: 控制日志输出的掩模,请查看LOG_CONSOLE、LOG_FILE、LOG_CALLBACK等宏 logFilePath: 文件日志保存路径,路径可以不存在(内部可以创建文件夹),设置为NULL关闭日志输出至文件 logFileDays: 文件日志保存天数,设置为0关闭日志文件 iniIsPath: 配置文件是内容还是路径 ini: 配置文件内容或路径,可以为空,如果该文件不存在,那么将导出默认配置至该文件 sslIsPath: ssl证书是内容还是路径 ssl: ssl证书内容或路径,可以为空 sslPwd: 证书密码,可以为空
func (*Config) LogFileDays ¶
func (*Config) LogFilePath ¶
func (*Config) SetIniIsPath ¶
func (*Config) SetLogFileDays ¶
func (*Config) SetLogFilePath ¶
func (*Config) SetLogLevel ¶
func (*Config) SetLogMask ¶
func (*Config) SetSslIsPath ¶
func (*Config) SetThreadNum ¶
Click to show internal directories.
Click to hide internal directories.