storageproviders

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalStorage

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

LocalStorage represents an instance of the local storage provider for HLS video.

func NewLocalStorage added in v0.0.11

func NewLocalStorage() *LocalStorage

NewLocalStorage returns a new LocalStorage instance.

func (*LocalStorage) Cleanup added in v0.1.1

func (s *LocalStorage) Cleanup() error

Cleanup will remove old files from the storage provider.

func (*LocalStorage) MasterPlaylistWritten

func (s *LocalStorage) MasterPlaylistWritten(localFilePath string)

MasterPlaylistWritten is called when the master hls playlist is written.

func (*LocalStorage) Save

func (s *LocalStorage) Save(filePath string, retryCount int) (string, error)

Save will save a local filepath using the storage provider.

func (*LocalStorage) SegmentWritten

func (s *LocalStorage) SegmentWritten(localFilePath string)

SegmentWritten is called when a single segment of video is written.

func (*LocalStorage) Setup

func (s *LocalStorage) Setup() error

Setup configures this storage provider.

func (*LocalStorage) VariantPlaylistWritten

func (s *LocalStorage) VariantPlaylistWritten(localFilePath string)

VariantPlaylistWritten is called when a variant hls playlist is written.

type S3Storage

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

S3Storage is the s3 implementation of a storage provider.

func NewS3Storage added in v0.0.11

func NewS3Storage() *S3Storage

NewS3Storage returns a new S3Storage instance.

func (*S3Storage) Cleanup added in v0.1.1

func (s *S3Storage) Cleanup() error

Cleanup will fire the different cleanup tasks required.

func (*S3Storage) MasterPlaylistWritten

func (s *S3Storage) MasterPlaylistWritten(localFilePath string)

MasterPlaylistWritten is called when the master hls playlist is written.

func (*S3Storage) RemoteCleanup added in v0.1.3

func (s *S3Storage) RemoteCleanup() error

RemoteCleanup will remove old files from the remote storage provider.

func (*S3Storage) Save

func (s *S3Storage) Save(filePath string, retryCount int) (string, error)

Save saves the file to the s3 bucket.

func (*S3Storage) SegmentWritten

func (s *S3Storage) SegmentWritten(localFilePath string)

SegmentWritten is called when a single segment of video is written.

func (*S3Storage) Setup

func (s *S3Storage) Setup() error

Setup sets up the s3 storage for saving the video to s3.

func (*S3Storage) VariantPlaylistWritten

func (s *S3Storage) VariantPlaylistWritten(localFilePath string)

VariantPlaylistWritten is called when a variant hls playlist is written.

Jump to

Keyboard shortcuts

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