config

package
v0.0.0-...-e786f2c Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfig

func NewConfig(path string) (cfgChan chan *Config, err error)

NewConfig 初始化一个server配置文件对象

Types

type Config

type Config struct {
	Debug bool         `toml:"debug"`
	Live  LiveConfig   `toml:"live"`
	Grpc  ServerConfig `toml:"grpc"`
}

Config 配置文件

type LiveConfig

type LiveConfig struct {
	Name    string `toml:"name"`     // 显示名
	BaseURL string `toml:"base_url"` // 基础推流地址
	AppName string `toml:"app_name"` // 推流app名
	LiveId  string `toml:"live_id"`  // 流id
}

LiveConfig 推流配置

type ServerConfig

type ServerConfig struct {
	Address string `toml:"address"` // 服务端地址
	Port    int    `toml:"port"`    // 端口
}

ServerConfig grpc 服务配置

Jump to

Keyboard shortcuts

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