config

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureConfig

type AzureConfig struct {
	AccountName   string `yaml:"account_name"` // (env AZURE_STORAGE_ACCOUNT)
	AccountKey    string `yaml:"account_key"`  // (env AZURE_STORAGE_KEY)
	ContainerName string `yaml:"container_name"`
}

type CPUCostConfig added in v1.0.4

type CPUCostConfig struct {
	RoomCompositeCpuCost  float64 `yaml:"room_composite_cpu_cost"`
	TrackCompositeCpuCost float64 `yaml:"track_composite_cpu_cost"`
	TrackCpuCost          float64 `yaml:"track_cpu_cost"`
}

type Config

type Config struct {
	Redis     RedisConfig `yaml:"redis"`      // required
	ApiKey    string      `yaml:"api_key"`    // required (env LIVEKIT_API_KEY)
	ApiSecret string      `yaml:"api_secret"` // required (env LIVEKIT_API_SECRET)
	WsUrl     string      `yaml:"ws_url"`     // required (env LIVEKIT_WS_URL)

	HealthPort           int    `yaml:"health_port"`
	PrometheusPort       int    `yaml:"prometheus_port"`
	LogLevel             string `yaml:"log_level"`
	TemplateBase         string `yaml:"template_base"`
	Insecure             bool   `yaml:"insecure"`
	LocalOutputDirectory string `yaml:"local_directory"` // used both for temporary storage before upload and local output

	S3    *S3Config    `yaml:"s3"`
	Azure *AzureConfig `yaml:"azure"`
	GCP   *GCPConfig   `yaml:"gcp"`

	// CPU costs for various egress types
	CPUCost CPUCostConfig `yaml:"cpu_cost"`

	// internal
	NodeID     string      `yaml:"-"`
	FileUpload interface{} `yaml:"-"` // one of S3, Azure, or GCP
}

func NewConfig

func NewConfig(confString string) (*Config, error)

type GCPConfig

type GCPConfig struct {
	CredentialsJSON string `yaml:"credentials_json"` // (env GOOGLE_APPLICATION_CREDENTIALS)
	Bucket          string `yaml:"bucket"`
}

type RedisConfig

type RedisConfig struct {
	Address  string `yaml:"address"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	DB       int    `yaml:"db"`
	UseTLS   bool   `yaml:"use_tls"`
}

type S3Config

type S3Config struct {
	AccessKey string `yaml:"access_key"` // (env AWS_ACCESS_KEY_ID)
	Secret    string `yaml:"secret"`     // (env AWS_SECRET_ACCESS_KEY)
	Region    string `yaml:"region"`     // (env AWS_DEFAULT_REGION)
	Endpoint  string `yaml:"endpoint"`
	Bucket    string `yaml:"bucket"`
}

Jump to

Keyboard shortcuts

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