Documentation ¶
Index ¶
- type ActiveStreamForwarding
- func (fwd *ActiveStreamForwarding) Close() error
- func (fwd *ActiveStreamForwarding) Start(ctx context.Context) (_err error)
- func (fwd *ActiveStreamForwarding) Stop() error
- func (fwd *ActiveStreamForwarding) String() string
- func (fwd *ActiveStreamForwarding) WaitForPublisher(ctx context.Context) (types.Publisher, error)
- type ForwardingKey
- type Option
- type Options
- type StreamForward
- type StreamForwards
- func (s *StreamForwards) AddStreamDestination(ctx context.Context, destinationID types.DestinationID, url string, ...) error
- func (s *StreamForwards) AddStreamForward(ctx context.Context, streamID types.StreamID, ...) (*StreamForward, error)
- func (s *StreamForwards) GetStreamForwardsByDestination(ctx context.Context, destID types.DestinationID) (_ret []StreamForward, _err error)
- func (s *StreamForwards) Init(ctx context.Context, opts ...types.InitOption) error
- func (s *StreamForwards) ListStreamDestinations(ctx context.Context) ([]types.StreamDestination, error)
- func (s *StreamForwards) ListStreamForwards(ctx context.Context) (_ret []StreamForward, _err error)
- func (fwds *StreamForwards) NewActiveStreamForward(ctx context.Context, streamID types.StreamID, urlString string, ...) (_ret *ActiveStreamForwarding, _err error)
- func (s *StreamForwards) RemoveStreamDestination(ctx context.Context, destinationID types.DestinationID) error
- func (s *StreamForwards) RemoveStreamForward(ctx context.Context, streamID types.StreamID, dstID types.DestinationID) error
- func (s *StreamForwards) UpdateStreamDestination(ctx context.Context, destinationID types.DestinationID, url string, ...) error
- func (s *StreamForwards) UpdateStreamForward(ctx context.Context, streamID types.StreamID, ...) (*StreamForward, error)
- type StreamServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveStreamForwarding ¶
type ActiveStreamForwarding struct { *StreamForwards StreamID types.StreamID DestinationURL *url.URL DestinationStreamKey string ReadCount atomic.Uint64 WriteCount atomic.Uint64 RecoderFactory recoder.Factory PauseFunc func(ctx context.Context, fwd *ActiveStreamForwarding) // contains filtered or unexported fields }
func (*ActiveStreamForwarding) Close ¶
func (fwd *ActiveStreamForwarding) Close() error
func (*ActiveStreamForwarding) Start ¶
func (fwd *ActiveStreamForwarding) Start(ctx context.Context) (_err error)
func (*ActiveStreamForwarding) Stop ¶
func (fwd *ActiveStreamForwarding) Stop() error
func (*ActiveStreamForwarding) String ¶
func (fwd *ActiveStreamForwarding) String() string
func (*ActiveStreamForwarding) WaitForPublisher ¶
type ForwardingKey ¶
type ForwardingKey struct { StreamID types.StreamID DestinationID types.DestinationID }
type StreamForward ¶
type StreamForward struct { StreamID types.StreamID DestinationID types.DestinationID Enabled bool Quirks types.ForwardingQuirks ActiveForwarding *ActiveStreamForwarding NumBytesWrote uint64 NumBytesRead uint64 }
type StreamForwards ¶
type StreamForwards struct { StreamServer types.PlatformsController Mutex xsync.Mutex DestinationStreamingLocker *lockmap.LockMap ActiveStreamForwardings map[ForwardingKey]*ActiveStreamForwarding StreamDestinations []types.StreamDestination RecoderFactory recoder.Factory }
func NewStreamForwards ¶
func NewStreamForwards( s StreamServer, recoderFactory recoder.Factory, pc types.PlatformsController, ) *StreamForwards
func (*StreamForwards) AddStreamDestination ¶
func (s *StreamForwards) AddStreamDestination( ctx context.Context, destinationID types.DestinationID, url string, streamKey string, ) error
func (*StreamForwards) AddStreamForward ¶
func (s *StreamForwards) AddStreamForward( ctx context.Context, streamID types.StreamID, destinationID types.DestinationID, enabled bool, quirks types.ForwardingQuirks, ) (*StreamForward, error)
func (*StreamForwards) GetStreamForwardsByDestination ¶
func (s *StreamForwards) GetStreamForwardsByDestination( ctx context.Context, destID types.DestinationID, ) (_ret []StreamForward, _err error)
func (*StreamForwards) Init ¶
func (s *StreamForwards) Init( ctx context.Context, opts ...types.InitOption, ) error
func (*StreamForwards) ListStreamDestinations ¶
func (s *StreamForwards) ListStreamDestinations( ctx context.Context, ) ([]types.StreamDestination, error)
func (*StreamForwards) ListStreamForwards ¶
func (s *StreamForwards) ListStreamForwards( ctx context.Context, ) (_ret []StreamForward, _err error)
func (*StreamForwards) NewActiveStreamForward ¶
func (fwds *StreamForwards) NewActiveStreamForward( ctx context.Context, streamID types.StreamID, urlString string, streamKey string, pauseFunc func(ctx context.Context, fwd *ActiveStreamForwarding), opts ...Option, ) (_ret *ActiveStreamForwarding, _err error)
func (*StreamForwards) RemoveStreamDestination ¶
func (s *StreamForwards) RemoveStreamDestination( ctx context.Context, destinationID types.DestinationID, ) error
func (*StreamForwards) RemoveStreamForward ¶
func (s *StreamForwards) RemoveStreamForward( ctx context.Context, streamID types.StreamID, dstID types.DestinationID, ) error
func (*StreamForwards) UpdateStreamDestination ¶
func (s *StreamForwards) UpdateStreamDestination( ctx context.Context, destinationID types.DestinationID, url string, streamKey string, ) error
func (*StreamForwards) UpdateStreamForward ¶
func (s *StreamForwards) UpdateStreamForward( ctx context.Context, streamID types.StreamID, destinationID types.DestinationID, enabled bool, quirks types.ForwardingQuirks, ) (*StreamForward, error)
type StreamServer ¶
type StreamServer interface { types.WithConfiger types.WaitPublisherChaner types.PubsubNameser types.GetPortServerser }
Click to show internal directories.
Click to hide internal directories.