Documentation
¶
Index ¶
- Constants
- func SetLogger(l *zap.SugaredLogger)
- type DummyStorage
- type LocalDriver
- type LocalStorage
- type LocalStream
- type NullDriver
- type RemoteDriver
- type RemoteStream
- type S3Configuration
- func (c *S3Configuration) Bucket(b string) *S3Configuration
- func (c *S3Configuration) Credentials(accessKey, secretKey string) *S3Configuration
- func (c *S3Configuration) DisableSSL() *S3Configuration
- func (c *S3Configuration) Endpoint(e string) *S3Configuration
- func (c *S3Configuration) Region(r string) *S3Configuration
- type S3Driver
- type StorageOp
- type StreamFileLoader
- type StreamFileProcessor
- type StreamFragment
Constants ¶
View Source
const ( MasterPlaylistName = "master.m3u8" PlaylistExt = ".m3u8" PlaylistContentType = "application/x-mpegURL" FragmentContentType = "video/mp4" )
View Source
const ( OpDelete = iota OpGetFragment OpPut )
Variables ¶
This section is empty.
Functions ¶
func SetLogger ¶
func SetLogger(l *zap.SugaredLogger)
Types ¶
type DummyStorage ¶
type DummyStorage struct { LocalStorage Ops []StorageOp }
func Dummy ¶
func Dummy() *DummyStorage
func (*DummyStorage) Delete ¶
func (s *DummyStorage) Delete(sdHash string) error
func (*DummyStorage) GetFragment ¶
func (s *DummyStorage) GetFragment(sdHash, name string) (StreamFragment, error)
func (*DummyStorage) Put ¶
func (s *DummyStorage) Put(lstream *LocalStream) (*RemoteStream, error)
type LocalDriver ¶
type LocalDriver interface { New(sdHash string) *LocalStream Open(sdHash string) (*LocalStream, error) Delete(sdHash string) error }
type LocalStorage ¶
type LocalStorage struct {
// contains filtered or unexported fields
}
func Local ¶
func Local(path string) LocalStorage
func (LocalStorage) Delete ¶
func (s LocalStorage) Delete(sdHash string) error
func (LocalStorage) New ¶
func (s LocalStorage) New(sdHash string) *LocalStream
func (LocalStorage) Open ¶
func (s LocalStorage) Open(sdHash string) (*LocalStream, error)
type LocalStream ¶
type LocalStream struct {
// contains filtered or unexported fields
}
func (LocalStream) Checksum ¶
func (s LocalStream) Checksum() string
func (LocalStream) Dive ¶
func (s LocalStream) Dive(loader StreamFileLoader, processor StreamFileProcessor) error
Dive processes Local HLS stream, calling `loader` to load and `processor` for each master/child playlists and all the files they reference. `processor` with filename as second argument.
func (LocalStream) FullPath ¶
func (s LocalStream) FullPath() string
func (LocalStream) LastPath ¶
func (s LocalStream) LastPath() string
func (*LocalStream) ReadMeta ¶
func (s *LocalStream) ReadMeta() error
func (LocalStream) Size ¶
func (s LocalStream) Size() int64
type NullDriver ¶
type NullDriver struct{}
func (NullDriver) Delete ¶
func (d NullDriver) Delete(sdHash string) error
func (NullDriver) GetFragment ¶
func (d NullDriver) GetFragment(s, n string) (StreamFragment, error)
func (NullDriver) Put ¶
func (d NullDriver) Put(stream *LocalStream) (*RemoteStream, error)
type RemoteDriver ¶
type RemoteDriver interface { Put(stream *LocalStream) (*RemoteStream, error) Delete(sdHash string) error GetFragment(sdHash, name string) (StreamFragment, error) }
type RemoteStream ¶
type RemoteStream struct {
// contains filtered or unexported fields
}
func (RemoteStream) URL ¶
func (s RemoteStream) URL() string
type S3Configuration ¶
type S3Configuration struct {
// contains filtered or unexported fields
}
func S3Configure ¶
func S3Configure() *S3Configuration
func S3ConfigureWasabi ¶
func S3ConfigureWasabi() *S3Configuration
func S3ConfigureWasabiEU ¶
func S3ConfigureWasabiEU() *S3Configuration
func (*S3Configuration) Bucket ¶
func (c *S3Configuration) Bucket(b string) *S3Configuration
Bucket ...
func (*S3Configuration) Credentials ¶
func (c *S3Configuration) Credentials(accessKey, secretKey string) *S3Configuration
Credentials set access key and secret key for accessing S3 bucket.
func (*S3Configuration) DisableSSL ¶
func (c *S3Configuration) DisableSSL() *S3Configuration
DisableSSL ...
func (*S3Configuration) Endpoint ¶
func (c *S3Configuration) Endpoint(e string) *S3Configuration
Endpoint ...
func (*S3Configuration) Region ¶
func (c *S3Configuration) Region(r string) *S3Configuration
Region ...
type S3Driver ¶
type S3Driver struct { *S3Configuration // contains filtered or unexported fields }
func InitS3Driver ¶
func InitS3Driver(cfg *S3Configuration) (*S3Driver, error)
func (*S3Driver) GetFragment ¶
func (s *S3Driver) GetFragment(sdHash, name string) (StreamFragment, error)
func (*S3Driver) Put ¶
func (s *S3Driver) Put(lstream *LocalStream) (*RemoteStream, error)
type StreamFileLoader ¶
type StreamFileProcessor ¶
type StreamFragment ¶
type StreamFragment interface { io.ReadCloser }
Click to show internal directories.
Click to hide internal directories.