config

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2025 License: AGPL-3.0-or-later Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TLSMinVersion is the minimum required version of TLS.
	TLSMinVersion = tls.VersionTLS13
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthMode added in v0.0.13

type AuthMode string

AuthMode defines the authentication mode for the API.

const (
	AuthModeAuto  AuthMode = "auto"
	AuthModeNone  AuthMode = "none"
	AuthModeToken AuthMode = "token"
)

type Config

type Config struct {
	ListenAddrs         ListenAddrs
	ServerURL           ServerURL
	TLS                 *TLS
	AuthMode            AuthMode
	InsecureAllowNoAuth bool   // DANGER: no authentication even for non-loopback addresses.
	DockerHost          string // DockerHost is the host to connect to the Docker daemon, falls back to Docker SDK's FromEnv(). Empty if not explicitly set.
	InDocker            bool
	Web                 Web
	Debug               bool // deprecated
	DataDir             string
	LogFile             LogFile
	Sources             Sources
	ImageNameFFMPEG     string
}

Config holds the configuration for the application.

type ListenAddrs added in v0.0.15

type ListenAddrs struct {
	TLS   string // may be empty
	Plain string // may be empty
}

ListenAddrs holds the listen addresses for the application.

type LogFile

type LogFile struct {
	Enabled bool
	Path    string
	// contains filtered or unexported fields
}

LogFile holds the configuration for the log file.

func (LogFile) GetPath added in v0.0.4

func (l LogFile) GetPath() string

GetPath returns the path to the log file. If the path is not set, it returns the default log path.

type MediaServerSource added in v0.0.8

type MediaServerSource struct {
	ImageName string // ImageName is the Docker image of the MediaMTX server.
	StreamKey string
	RTMP      RTMPSource
	RTMPS     RTMPSource
}

MediaServerSource holds the configuration for the media server source.

type NetAddr added in v0.0.8

type NetAddr struct {
	IP   string
	Port int
}

NetAddr holds an IP and/or port.

type RTMPSource

type RTMPSource struct {
	Enabled bool

	NetAddr
}

RTMPSource holds the configuration for the RTMP source.

type ServerURL added in v0.0.15

type ServerURL struct {
	Raw      string // Raw is the original URL string, e.g. "https://example.com:443/"
	Scheme   string // Scheme is the HTTP scheme, e.g. "http://" or "https://"
	Hostname string // Hostname is the domain part of the host, e.g. "example.com"
	Port     string // Port is the stringified port, e.g. "443" or "80"
	BaseURL  string // Base URL is the base URL for web component, including trailing slash.
}

ServerURL holds the parsed components of a server URL.

func NewServerURL added in v0.0.15

func NewServerURL(raw string) (ServerURL, error)

NewServerURL parses a raw URL string and returns a ServerURL struct.

type Sources

type Sources struct {
	MediaServer MediaServerSource
}

Sources holds the configuration for the sources.

type TLS added in v0.0.8

type TLS struct {
	CertPath string
	KeyPath  string
}

TLS holds the TLS configuration.

type Web added in v0.0.15

type Web struct {
	Enabled bool // Enabled is true if the web interface is enabled.
}

Web holds the configuration for the web interface.

Jump to

Keyboard shortcuts

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