videostorage

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(bucket string) *videoStorage

New constructs a new video storage that reads from an S3 bucket given by parameter. This constructor will construct the struct as well as kick off an update thread that periodically polls the S3 bucket for videos. Any object without the .flv extension is ignored. The polling period defaults to once every 24 hours, but can be overridden by the VIDEO_ENUMERATION_PERIOD_MINUTES environment variable

Types

type Storage

type Storage interface {
	// PickVideo should return a random video from storage. This should return the name of the video as well
	// as an `io.ReadCloser` to read the video
	PickVideo() (string, io.ReadCloser)
	ForceEnumerate()
	GetVideoCount() int
}

Jump to

Keyboard shortcuts

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