config

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: GPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfigPath added in v1.4.0

func DefaultConfigPath() string

DefaultConfigPath return the default config path file

func FormalizeConfigPath added in v1.4.0

func FormalizeConfigPath(path string) (string, error)

FormalizeConfigPath formalize config path. If config path is the default config path (home directory), it returns a computed path

Types

type AdminConfig

type AdminConfig struct {
	APIKey string `yaml:"apiKey"`
	URL    string `yaml:"url"`
}

AdminConfig represents the admin configuration

type BalancerConfig

type BalancerConfig struct {
	MetricsRange string `yaml:"metricsRange"`
	CPULimit     int    `yaml:"cpuLimit"`
	MemLimit     int    `yaml:"memLimit"`
}

BalancerConfig represents the balancer configuration

func (*BalancerConfig) SetDefaultValues added in v1.4.0

func (bc *BalancerConfig) SetDefaultValues()

SetDefaultValues initialize BalancerConfig default values

type BigBlueButton

type BigBlueButton struct {
	Secret                 string `yaml:"secret"`
	RecordingsPollInterval string `yaml:"recordingsPollInterval"`
}

BigBlueButton configuration mapping

type Config

type Config struct {
	BigBlueButton BigBlueButton  `yaml:"bigbluebutton"`
	Admin         AdminConfig    `yaml:"admin"`
	Balancer      BalancerConfig `yaml:"balancer"`
	Port          int            `yaml:"port"`
	RDB           RDB            `yaml:"redis"`
	IDB           IDB            `yaml:"influxdb"`
}

Config represents main configuration mapping

func Load

func Load(path string) (*Config, error)

Load the configuration from the given path

type IDB

type IDB struct {
	Address      string `yaml:"address"`
	Token        string `yaml:"token"`
	Organization string `yaml:"organization"`
	Bucket       string `yaml:"bucket"`
}

IDB represents influxdb database configuration mapping

type RDB

type RDB struct {
	Address  string `yaml:"address"`
	Password string `yaml:"password"`
	DB       int    `yaml:"database"`
}

RDB represents redis database configuration mapping

Jump to

Keyboard shortcuts

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