live-sfu-demo/internal/sfu/distributor.go

19 lines
460 B
Go

package sfu
import "context"
// Distributor abstracts a distribution channel downstream of the SRS trunk.
type Distributor interface {
Kind() string // srs-hls / cf / cdn
Name() string
Configured() bool
Forward(ctx context.Context, room, stream string) (*ForwardResult, error)
}
// ForwardResult describes the state of a distribution after Ensure.
type ForwardResult struct {
Kind string
URL string
Status string // ready | forwarding | error
}