config

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const Latency = uint64(3e9)
View Source
const (
	TmpDir = "/home/egress/tmp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioConfig added in v1.5.6

type AudioConfig struct {
	AudioEnabled     bool
	AudioTranscoding bool
	AudioOutCodec    types.MimeType
	AudioBitrate     int32
	AudioFrequency   int32
}

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 BaseConfig added in v1.5.3

type BaseConfig struct {
	NodeID string // do not supply - will be overwritten

	// required
	Redis     *redis.RedisConfig `yaml:"redis"`      // redis config
	ApiKey    string             `yaml:"api_key"`    // (env LIVEKIT_API_KEY)
	ApiSecret string             `yaml:"api_secret"` // (env LIVEKIT_API_SECRET)
	WsUrl     string             `yaml:"ws_url"`     // (env LIVEKIT_WS_URL)

	// optional
	Logging             *logger.Config          `yaml:"logging"`               // logging config
	TemplateBase        string                  `yaml:"template_base"`         // custom template base url
	BackupStorage       string                  `yaml:"backup_storage"`        // backup file location for failed uploads
	ClusterID           string                  `yaml:"cluster_id"`            // cluster this instance belongs to
	EnableChromeSandbox bool                    `yaml:"enable_chrome_sandbox"` // enable Chrome sandbox, requires extra docker configuration
	StorageConfig       `yaml:",inline"`        // upload config (S3, Azure, GCP, or AliOSS)
	SessionLimits       `yaml:"session_limits"` // session duration limits

	// dev/debugging
	Insecure bool        `yaml:"insecure"` // allow chrome to connect to an insecure websocket
	Debug    DebugConfig `yaml:"debug"`    // create dot file on internal error

	// deprecated
	LogLevel string `yaml:"log_level"` // Use Logging instead
}

type CPUCostConfig added in v1.0.4

type CPUCostConfig struct {
	MaxCpuUtilization         float64 `yaml:"max_cpu_utilization"` // Maximum allowed CPU utilization when deciding to accept a request. Default to 80%.
	RoomCompositeCpuCost      float64 `yaml:"room_composite_cpu_cost"`
	AudioRoomCompositeCpuCost float64 `yaml:"audio_room_composite_cpu_cost"`
	WebCpuCost                float64 `yaml:"web_cpu_cost"`
	AudioWebCpuCost           float64 `yaml:"audio_web_cpu_cost"`
	ParticipantCpuCost        float64 `yaml:"participant_cpu_cost"`
	TrackCompositeCpuCost     float64 `yaml:"track_composite_cpu_cost"`
	TrackCpuCost              float64 `yaml:"track_cpu_cost"`
}

type DebugConfig added in v1.7.5

type DebugConfig struct {
	EnableProfiling bool             `yaml:"enable_profiling"` // create dot file and pprof on internal error
	PathPrefix      string           `yaml:"path_prefix"`      // filepath prefix for uploads
	LogKeyFrames    bool             `yaml:"log_keyframes"`    // log first 15s of keyframes when streaming
	StorageConfig   `yaml:",inline"` // upload config (S3, Azure, GCP, or AliOSS)
}

type EgressS3Upload added in v1.8.1

type EgressS3Upload struct {
	*livekit.S3Upload
	MaxRetries    int
	MaxRetryDelay time.Duration
	MinRetryDelay time.Duration
	AwsLogLevel   aws.LogLevelType
}

type FileConfig added in v1.7.1

type FileConfig struct {
	FileInfo        *livekit.FileInfo
	LocalFilepath   string
	StorageFilepath string

	DisableManifest bool
	UploadConfig    UploadConfig
	// contains filtered or unexported fields
}

func (FileConfig) GetOutputType added in v1.7.1

func (o FileConfig) GetOutputType() types.OutputType

type GCPConfig

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

type ImageConfig added in v1.7.13

type ImageConfig struct {
	Id string // Used internally to map a gst Bin/element back to a sink and as part of the path

	ImagesInfo     *livekit.ImagesInfo
	LocalDir       string
	StorageDir     string
	ImagePrefix    string
	ImageSuffix    livekit.ImageFileSuffix
	ImageExtension types.FileExtension

	DisableManifest bool
	UploadConfig    UploadConfig

	CaptureInterval uint32
	Width           int32
	Height          int32
	ImageOutCodec   types.MimeType
	// contains filtered or unexported fields
}

func (ImageConfig) GetOutputType added in v1.7.13

func (o ImageConfig) GetOutputType() types.OutputType

type OutputConfig added in v1.5.6

type OutputConfig interface {
	GetOutputType() types.OutputType
}

type PipelineConfig added in v1.5.3

type PipelineConfig struct {
	BaseConfig `yaml:",inline"`

	HandlerID string `yaml:"handler_id"`
	TmpDir    string `yaml:"tmp_dir"`

	types.RequestType `yaml:"-"`
	SourceConfig      `yaml:"-"`
	AudioConfig       `yaml:"-"`
	VideoConfig       `yaml:"-"`

	Outputs              map[types.EgressType][]OutputConfig `yaml:"-"`
	OutputCount          int                                 `yaml:"-"`
	FinalizationRequired bool                                `yaml:"-"`

	Info *info.EgressInfo `yaml:"-"`
}

func GetValidatedPipelineConfig added in v1.5.3

func GetValidatedPipelineConfig(conf *ServiceConfig, req *rpc.StartEgressRequest) (*PipelineConfig, error)

func NewPipelineConfig added in v1.5.3

func NewPipelineConfig(confString string, req *rpc.StartEgressRequest) (*PipelineConfig, error)

func (*PipelineConfig) GetEncodedOutputs added in v1.7.13

func (p *PipelineConfig) GetEncodedOutputs() []OutputConfig

func (*PipelineConfig) GetFileConfig added in v1.7.1

func (p *PipelineConfig) GetFileConfig() *FileConfig

func (*PipelineConfig) GetImageConfigs added in v1.7.13

func (p *PipelineConfig) GetImageConfigs() []*ImageConfig

func (*PipelineConfig) GetSegmentConfig added in v1.7.1

func (p *PipelineConfig) GetSegmentConfig() *SegmentConfig

func (*PipelineConfig) GetStreamConfig added in v1.7.1

func (p *PipelineConfig) GetStreamConfig() *StreamConfig

func (*PipelineConfig) GetWebsocketConfig added in v1.7.1

func (p *PipelineConfig) GetWebsocketConfig() *StreamConfig

func (*PipelineConfig) Update added in v1.5.3

func (p *PipelineConfig) Update(request *rpc.StartEgressRequest) error

func (*PipelineConfig) UpdateInfoFromSDK added in v1.5.6

func (p *PipelineConfig) UpdateInfoFromSDK(identifier string, replacements map[string]string, w, h uint32) error

used for sdk input source

func (*PipelineConfig) ValidateUrl added in v1.5.6

func (p *PipelineConfig) ValidateUrl(rawUrl string, outputType types.OutputType) (string, string, error)

type ProxyConfig added in v1.8.3

type ProxyConfig struct {
	Url      string `yaml:"url"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

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"`
	ForcePathStyle bool          `yaml:"force_path_style"`
	ProxyConfig    *ProxyConfig  `yaml:"proxy_config"`
	MaxRetries     int           `yaml:"max_retries"`
	MaxRetryDelay  time.Duration `yaml:"max_retry_delay"`
	MinRetryDelay  time.Duration `yaml:"min_retry_delay"`
	AwsLogLevel    string        `yaml:"aws_log_level"`

	// deprecated
	Proxy string `yaml:"proxy"` // use ProxyConfig instead
}

type SDKSourceParams added in v1.5.6

type SDKSourceParams struct {
	TrackID      string
	AudioTrackID string
	VideoTrackID string
	Identity     string
	TrackSource  string
	TrackKind    string
	AudioInCodec types.MimeType
	VideoInCodec types.MimeType
	AudioTrack   *TrackSource
	VideoTrack   *TrackSource
}

type SegmentConfig added in v1.7.1

type SegmentConfig struct {
	SegmentsInfo         *livekit.SegmentsInfo
	LocalDir             string
	StorageDir           string
	PlaylistFilename     string
	LivePlaylistFilename string
	SegmentPrefix        string
	SegmentSuffix        livekit.SegmentedFileSuffix
	SegmentDuration      int

	DisableManifest bool
	UploadConfig    UploadConfig
	// contains filtered or unexported fields
}

func (SegmentConfig) GetOutputType added in v1.7.1

func (o SegmentConfig) GetOutputType() types.OutputType

type ServiceConfig added in v1.5.3

type ServiceConfig struct {
	BaseConfig `yaml:",inline"`

	HealthPort       int `yaml:"health_port"`        // health check port
	TemplatePort     int `yaml:"template_port"`      // room composite template server port
	PrometheusPort   int `yaml:"prometheus_port"`    // prometheus handler port
	DebugHandlerPort int `yaml:"debug_handler_port"` // egress debug handler port

	*CPUCostConfig `yaml:"cpu_cost"` // CPU costs for the different egress types
}

func NewServiceConfig added in v1.5.3

func NewServiceConfig(confString string) (*ServiceConfig, error)

type SessionLimits added in v1.2.0

type SessionLimits struct {
	FileOutputMaxDuration    time.Duration `yaml:"file_output_max_duration"`
	StreamOutputMaxDuration  time.Duration `yaml:"stream_output_max_duration"`
	SegmentOutputMaxDuration time.Duration `yaml:"segment_output_max_duration"`
	ImageOutputMaxDuration   time.Duration `yaml:"image_output_max_duration"`
}

type SourceConfig added in v1.5.6

type SourceConfig struct {
	SourceType types.SourceType
	WebSourceParams
	SDKSourceParams
}

type StorageConfig added in v1.7.5

type StorageConfig struct {
	S3     *S3Config    `yaml:"s3"`
	Azure  *AzureConfig `yaml:"azure"`
	GCP    *GCPConfig   `yaml:"gcp"`
	AliOSS *S3Config    `yaml:"alioss"`
}

func (StorageConfig) ToUploadConfig added in v1.7.5

func (c StorageConfig) ToUploadConfig() UploadConfig

type StreamConfig added in v1.7.1

type StreamConfig struct {
	Urls       []string
	StreamInfo map[string]*livekit.StreamInfo
	// contains filtered or unexported fields
}

func (StreamConfig) GetOutputType added in v1.7.1

func (o StreamConfig) GetOutputType() types.OutputType

type TrackSource added in v1.7.8

type TrackSource struct {
	TrackID     string
	Kind        lksdk.TrackKind
	AppSrc      *app.Source
	MimeType    types.MimeType
	PayloadType webrtc.PayloadType
	ClockRate   uint32
}

type UploadConfig added in v1.7.5

type UploadConfig interface{}

type VideoConfig added in v1.5.6

type VideoConfig struct {
	VideoEnabled     bool
	VideoDecoding    bool
	VideoEncoding    bool
	VideoOutCodec    types.MimeType
	VideoProfile     types.Profile
	Width            int32
	Height           int32
	Depth            int32
	Framerate        int32
	VideoBitrate     int32
	KeyFrameInterval float64
}

type WebSourceParams added in v1.5.6

type WebSourceParams struct {
	AwaitStartSignal bool
	Display          string
	Layout           string
	Token            string
	BaseUrl          string
	WebUrl           string
}

Jump to

Keyboard shortcuts

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