configure

package
v0.0.0-...-1eddd0a Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindEnvs

func BindEnvs(config *viper.Viper, iface interface{}, parts ...string)

Types

type Config

type Config struct {
	Level      string `mapstructure:"level" json:"level"`
	ConfigFile string `mapstructure:"config" json:"config"`
	NoHeader   bool   `mapstructure:"noheader" json:"noheader"`

	Edge struct {
		Bind string `mapstructure:"bind" json:"bind"`
	} `mapstructure:"edge" json:"edge"`

	RTMP struct {
		Bind string `mapstructure:"bind" json:"bind"`

		Auth struct {
			JwtToken string `mapstructure:"jwt_token" json:"jwt_token"`
		} `mapstructure:"auth" json:"auth"`

		Ingest struct {
			URL string `mapstructure:"url" json:"url"`
		}

		Transcoder struct {
			URL string `mapstructure:"url" json:"url"`
		} `mapstructure:"transcoder" json:"transcoder"`

		Muxer struct {
			URL string `mapstructure:"url" json:"url"`
		} `mapstructure:"muxer" json:"muxer"`
	} `mapstructure:"rtmp" json:"rtmp"`

	Pod struct {
		Name          string `mapstructure:"name" json:"name"`
		IP            string `mapstructure:"ip" json:"ip"`
		AdvertisePort int    `mapstructure:"advertise_port" json:"advertise_port"`
	} `mapstructure:"pod" json:"pod"`

	Mongo struct {
		URI      string `mapstructure:"uri" json:"uri"`
		Database string `mapstructure:"database" json:"database"`
		Direct   bool   `mapstructure:"direct" json:"direct"`
	} `mapstructure:"mongo" json:"mongo"`

	Redis struct {
		Username   string   `mapstructure:"username" json:"username"`
		Password   string   `mapstructure:"password" json:"password"`
		MasterName string   `mapstructure:"master_name" json:"master_name"`
		Addresses  []string `mapstructure:"addresses" json:"addresses"`
		Database   int      `mapstructure:"database" json:"database"`
		Sentinel   bool     `mapstructure:"sentinel" json:"sentinel"`
	} `mapstructure:"redis" json:"redis"`

	Monitoring struct {
		Enabled bool       `mapstructure:"enabled" json:"enabled"`
		Bind    string     `mapstructure:"bind" json:"bind"`
		Labels  []KeyValue `mapstructure:"labels" json:"labels"`
	} `mapstructure:"monitoring" json:"monitoring"`

	Health struct {
		Enabled bool   `mapstructure:"enabled" json:"enabled"`
		Bind    string `mapstructure:"bind" json:"bind"`
	} `mapstructure:"health" json:"health"`
}

func New

func New() *Config

type KeyValue

type KeyValue struct {
	Key   string `mapstructure:"key" json:"key"`
	Value string `mapstructure:"value" json:"value"`
}

Jump to

Keyboard shortcuts

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