config

package
v2.12.9 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LiveKitTOMLFile = "livekit.toml"
)

Variables

View Source
var (
	ErrInvalidConfig       = errors.New("invalid configuration file")
	ErrInvalidReplicaCount = fmt.Errorf("replicas cannot be greater than max_replicas: %w", ErrInvalidConfig)
)

Functions

This section is empty.

Types

type AgentTOML deprecated added in v2.4.7

type AgentTOML struct {
	ProjectSubdomain string `toml:"project_subdomain"`
}

Deprecated: use LiveKitTOML instead

type CLIConfig

type CLIConfig struct {
	DefaultProject string          `yaml:"default_project"`
	Projects       []ProjectConfig `yaml:"projects"`
	DeviceName     string          `yaml:"device_name"`
	// contains filtered or unexported fields
}

func LoadOrCreate

func LoadOrCreate() (*CLIConfig, error)

LoadOrCreate loads config file from ~/.livekit/cli-config.yaml if it doesn't exist, it'll return an empty config file

func (*CLIConfig) PersistIfNeeded

func (c *CLIConfig) PersistIfNeeded() error

func (*CLIConfig) ProjectExists

func (c *CLIConfig) ProjectExists(name string) bool

func (*CLIConfig) RemoveProject

func (c *CLIConfig) RemoveProject(name string) error

type LiveKitTOML added in v2.4.7

type LiveKitTOML struct {
	Project *LiveKitTOMLProjectConfig `toml:"project"` // Required
	Agent   *LiveKitTOMLAgentConfig   `toml:"agent"`
}

func LoadTOMLFile added in v2.4.7

func LoadTOMLFile(dir string, tomlFileName string) (*LiveKitTOML, bool, error)

func NewLiveKitTOML added in v2.4.7

func NewLiveKitTOML(forSubdomain string) *LiveKitTOML

func (*LiveKitTOML) HasAgent added in v2.4.7

func (c *LiveKitTOML) HasAgent() bool

func (*LiveKitTOML) SaveTOMLFile added in v2.4.10

func (c *LiveKitTOML) SaveTOMLFile(dir string, tomlFileName string) error

func (*LiveKitTOML) WithDefaultAgent added in v2.4.7

func (c *LiveKitTOML) WithDefaultAgent() *LiveKitTOML

type LiveKitTOMLAgentConfig added in v2.4.7

type LiveKitTOMLAgentConfig struct {
	ID string `toml:"id"`
}

type LiveKitTOMLProjectConfig added in v2.4.7

type LiveKitTOMLProjectConfig struct {
	Subdomain string `toml:"subdomain"`
}

type ProjectConfig

type ProjectConfig struct {
	Name      string `yaml:"name"`
	ProjectId string `yaml:"project_id"`
	URL       string `yaml:"url"`
	APIKey    string `yaml:"api_key"`
	APISecret string `yaml:"api_secret"`
}

func LoadDefaultProject

func LoadDefaultProject() (*ProjectConfig, error)

func LoadProject

func LoadProject(name string) (*ProjectConfig, error)

func LoadProjectBySubdomain added in v2.4.0

func LoadProjectBySubdomain(subdomain string) (*ProjectConfig, error)

Jump to

Keyboard shortcuts

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