utils

package
v0.0.0-...-3cbcf3d Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureDefaultLogger

func ConfigureDefaultLogger(logLevel string, logFile string, loggerOptions slog.HandlerOptions) (*os.File, error)

Configure the slog logger with a specific log level and potential output file.

Valid log levels are "none", "error", "warn", "info", "debug". Any other value returns an error. logFile may either specify a file path (an error is returned if the path cannot be opened) or none, in which case the logger points to stdout.

Returns the os.File pointer that slog writes to, so it may be gracefully shut: ``` logFilePointer := config.ConfigureLogger()

if logFilePointer != nil{
	defer logFilePointer.Close()
}

```

func GetUserAuthorizedCodecs

func GetUserAuthorizedCodecs(codecStrings []string) ([]webrtc.RTPCodecCapability, error)

Load and return a list of codecs using the given strings. Strings must be associated to a codec, otherwise an error is returned.

See github.com/Honorable-Knights-of-the-Roundtable/Roundtable/internal/networking/codecs.go for a list of all codecs and their associated strings. If codecStrings is not-deduplicated, then the returned array will not be de-duplicated.

Types

This section is empty.

Jump to

Keyboard shortcuts

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