config

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2025 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name       string
	Version    string
	GitHash    string
	LongName   string
	InstanceId string
}

type Channels

type Channels struct {
	Subscribe string `yaml:"subscribe,omitempty"`
	Publish   string `yaml:"publish,omitempty"`
}

type Config

type Config struct {
	App        App        `yaml:"-"`
	Recorder   Recorder   `yaml:"recorder,omitempty"`
	PubSub     PubSub     `yaml:"pubsub,omitempty"`
	WebRTC     WebRTC     `yaml:"webrtc,omitempty"`
	HTTP       HTTP       `yaml:"http,omitempty"`
	Prometheus Prometheus `yaml:"prometheus,omitempty"`
	LiveKit    LiveKit    `yaml:"livekit,omitempty"`
	Log        LogConfig  `yaml:"log"`
}

func (*Config) GetDefaults

func (cfg *Config) GetDefaults() *Config

func (*Config) Load

func (cfg *Config) Load(app App, configFile string)

func (*Config) SetDefaults

func (cfg *Config) SetDefaults()

SetDefaults sets the default values

type HTTP

type HTTP struct {
	Enable bool `yaml:"enable,omitempty"`
	Port   int  `yaml:"port,omitempty"`
}

type HealthCheck added in v0.10.0

type HealthCheck struct {
	Enable             bool          `yaml:"enable,omitempty"`
	Interval           time.Duration `yaml:"interval,omitempty"`
	AbortBootOnFailure bool          `yaml:"abortBootOnFailure,omitempty"`
}

type LiveKit

type LiveKit struct {
	Host                  string               `yaml:"host,omitempty" mapstructure:"host"`
	APIKey                string               `yaml:"apiKey,omitempty" mapstructure:"api_key"`
	APISecret             string               `yaml:"apiSecret,omitempty" mapstructure:"api_secret"`
	PacketReadTimeout     time.Duration        `yaml:"packetReadTimeout,omitempty" mapstructure:"packet_read_timeout"`
	PreferredVideoQuality livekit.VideoQuality `yaml:"preferredVideoQuality,omitempty" mapstructure:"preferred_video_quality"`
	HealthCheck           HealthCheck          `yaml:"healthCheck,omitempty"`
}

type LogConfig

type LogConfig struct {
	Level string `yaml:"level"`
}

type Prometheus

type Prometheus struct {
	Enable        bool   `yaml:"enable,omitempty"`
	ListenAddress string `yaml:"listenAddress,omitempty"`
}

type PubSub

type PubSub struct {
	Channels Channels `yaml:"channels,omitempty"`
	Adapter  string   `yaml:"adapter,omitempty"`
	Adapters map[string]interface{}
}

type Recorder

type Recorder struct {
	Directory            string `yaml:"directory,omitempty"`
	DirFileMode          string `yaml:"dirFileMode,omitempty"`
	FileMode             string `yaml:"fileMode,omitempty"`
	WriteToDevNull       bool   `yaml:"writeToDevNull,omitempty"`
	WriteIVFCopy         bool   `yaml:"writeIVFCopy,omitempty"`
	VideoPacketQueueSize uint16 `yaml:"videoPacketQueueSize,omitempty"`
	AudioPacketQueueSize uint16 `yaml:"audioPacketQueueSize,omitempty"`
	UseCustomSampler     bool   `yaml:"useCustomSampler,omitempty"`
	WriteStatsFile       bool   `yaml:"writeStatsFile,omitempty"`
}

type Redis

type Redis struct {
	Address  string `yaml:"address,omitempty"`
	Network  string `yaml:"network,omitempty"`
	Password string `yaml:"password,omitempty"`
}

type WebRTC

type WebRTC struct {
	ICEServers             []webrtc.ICEServer `yaml:"iceServers,omitempty"`
	RTCMinPort             uint16             `yaml:"rtcMinPort,omitempty"`
	RTCMaxPort             uint16             `yaml:"rtcMaxPort,omitempty"`
	JitterBuffer           uint16             `yaml:"jitterBuffer,omitempty"`
	JitterBufferPktTimeout uint16             `yaml:"jitterBufferPktTimeout,omitempty"`
}

Jump to

Keyboard shortcuts

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