configure

package
v0.0.0-...-9c3e309 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = viper.New()
View Source
var RoomKeys = &RoomKeysType{
	localCache: cache.New(cache.NoExpiration, 0),
}

Functions

func CheckAppName

func CheckAppName(appname string) bool

func GetStaticPushUrlList

func GetStaticPushUrlList(appname string) ([]string, bool)

func Init

func Init()

Types

type Application

type Application struct {
	Appname    string   `mapstructure:"appname"`
	Live       bool     `mapstructure:"live"`
	Hls        bool     `mapstructure:"hls"`
	Flv        bool     `mapstructure:"flv"`
	Api        bool     `mapstructure:"api"`
	StaticPush []string `mapstructure:"static_push"`
}

type Applications

type Applications []Application

type JWT

type JWT struct {
	Secret    string `mapstructure:"secret"`
	Algorithm string `mapstructure:"algorithm"`
}

type RoomKeysType

type RoomKeysType struct {
	// contains filtered or unexported fields
}

func (*RoomKeysType) DeleteChannel

func (r *RoomKeysType) DeleteChannel(channel string) bool

func (*RoomKeysType) DeleteKey

func (r *RoomKeysType) DeleteKey(key string) bool

func (*RoomKeysType) GetChannel

func (r *RoomKeysType) GetChannel(key string) (channel string, err error)

func (*RoomKeysType) GetKey

func (r *RoomKeysType) GetKey(channel string) (newKey string, err error)

func (*RoomKeysType) SetKey

func (r *RoomKeysType) SetKey(channel string) (key string, err error)

set/reset a random key for channel

type ServerCfg

type ServerCfg struct {
	Level           string       `mapstructure:"level"`
	ConfigFile      string       `mapstructure:"config_file"`
	FLVArchive      bool         `mapstructure:"flv_archive"`
	FLVDir          string       `mapstructure:"flv_dir"`
	RTMPNoAuth      bool         `mapstructure:"rtmp_noauth"`
	RTMPAddr        string       `mapstructure:"rtmp_addr"`
	HTTPFLVAddr     string       `mapstructure:"httpflv_addr"`
	HLSAddr         string       `mapstructure:"hls_addr"`
	HLSKeepAfterEnd bool         `mapstructure:"hls_keep_after_end"`
	APIAddr         string       `mapstructure:"api_addr"`
	RedisAddr       string       `mapstructure:"redis_addr"`
	RedisPwd        string       `mapstructure:"redis_pwd"`
	ReadTimeout     int          `mapstructure:"read_timeout"`
	WriteTimeout    int          `mapstructure:"write_timeout"`
	GopNum          int          `mapstructure:"gop_num"`
	JWT             JWT          `mapstructure:"jwt"`
	Server          Applications `mapstructure:"server"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL