package live import ( "errors" "time" ) var ErrDisabled = errors.New("live provider disabled") var ErrInvalidConfig = errors.New("live provider configuration invalid") type Config struct { Mode string Provider string PushDomain string PlayDomain string AppName string AuthKey string PlayAuthKey string AuthExpireSeconds int64 PlayURLTTLSeconds int64 Protocol string SRTPort int AllowRealCloud bool } type StreamRequest struct { StreamName string ExpiresAt time.Time MaxBitrateBps int64 } type StreamCredentials struct { Provider string PushURL string ExpiresAt time.Time } type PlayRequest struct { StreamName string ExpiresAt time.Time } type PlayURLs struct { HLS string FLV string RTMP string ExpiresAt time.Time } type OnlineStatus struct { Online bool BitrateBps int64 ClientCount int } type Adapter interface { Provider() string CreateStream(req StreamRequest) (StreamCredentials, error) CreatePlayURLs(req PlayRequest) (PlayURLs, error) QueryOnline(streamName string) (OnlineStatus, error) }