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 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 ¶
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 (*CLIConfig) ProjectExists ¶
func (*CLIConfig) RemoveProject ¶
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)
Click to show internal directories.
Click to hide internal directories.