streaming

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package streaming exposes authenticated remote media through a temporary loopback-only HTTP endpoint.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Username   string
	Password   string
	HTTPClient *http.Client
}

Config configures authenticated upstream media requests.

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

Proxy creates temporary loopback streaming sessions.

func NewProxy

func NewProxy(config Config) *Proxy

NewProxy creates a streaming proxy. Credentials remain in memory and are added only to requests sent to the fixed upstream media origin.

func (*Proxy) Start

func (p *Proxy) Start(ctx context.Context, source *url.URL) (*Session, error)

Start exposes source through a random loopback URL until the context is canceled or the returned session is closed.

type Session

type Session struct {
	// contains filtered or unexported fields
}

Session represents one temporary local media endpoint.

func (*Session) Close

func (s *Session) Close() error

Close stops the local streaming server and interrupts active streams.

func (*Session) Done

func (s *Session) Done() <-chan struct{}

Done is closed after the local streaming server stops.

func (*Session) URL

func (s *Session) URL() *url.URL

URL returns a copy of the temporary loopback media URL.

Jump to

Keyboard shortcuts

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