Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- type Configuration
- func (c *Configuration) CacheSize(size int64) *Configuration
- func (c *Configuration) HTTPClient(httpClient HTTPRequester) *Configuration
- func (c *Configuration) ItemsToPrune(i uint32) *Configuration
- func (c *Configuration) LogLevel(l int) *Configuration
- func (c *Configuration) Server(server string) *Configuration
- func (c *Configuration) VideoPath(videoPath string) *Configuration
- type Fragment
- type HTTPRequester
Constants ¶
View Source
const ( MasterPlaylistName = "master.m3u8" Dev = iota Prod )
Variables ¶
View Source
var ( TranscodedCacheSizeBytes = promauto.NewGauge(prometheus.GaugeOpts{ Name: "transcoded_cache_size_bytes", }) TranscodedCacheItemsCount = promauto.NewGauge(prometheus.GaugeOpts{ Name: "transcoded_cache_items_count", }) TranscodedResult = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "transcoded_request_result", }, []string{"type"}) TranscodedCacheQueryCount = promauto.NewCounter(prometheus.CounterOpts{ Name: "transcoded_cache_query_count", }) TranscodedCacheMiss = promauto.NewCounter(prometheus.CounterOpts{ Name: "transcoded_cache_miss", }) FetchSizeBytes = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "fetch_size_bytes", }, []string{"source"}) FetchDurationSeconds = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "fetch_duration_seconds", }, []string{"source"}) FetchCount = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "fetch_count", }, []string{"source"}) FetchFailureCount = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "fetch_failure_count", }, []string{"source", "http_code"}) )
View Source
var ErrNotOK = errors.New("http response not OK")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { *Configuration // contains filtered or unexported fields }
func New ¶
func New(cfg *Configuration) Client
func (Client) GetPlaybackPath ¶ added in v0.9.1
func (Client) PlayFragment ¶ added in v0.9.1
func (c Client) PlayFragment(lurl, sdHash, fragment string, w http.ResponseWriter, r *http.Request) error
PlayFragment ...
type Configuration ¶
type Configuration struct {
// contains filtered or unexported fields
}
func Configure ¶
func Configure() *Configuration
func (*Configuration) CacheSize ¶
func (c *Configuration) CacheSize(size int64) *Configuration
CacheSize defines local disk cache size for downloaded transcoded videos.
func (*Configuration) HTTPClient ¶
func (c *Configuration) HTTPClient(httpClient HTTPRequester) *Configuration
func (*Configuration) ItemsToPrune ¶ added in v0.5.9
func (c *Configuration) ItemsToPrune(i uint32) *Configuration
ItemsToPrune defines how many items to prune during cache cleanup
func (*Configuration) LogLevel ¶ added in v0.6.1
func (c *Configuration) LogLevel(l int) *Configuration
LogLevel sets verbosity of logging. `Dev` outputs a lot of debugging info, `Prod` is more restrained.
func (*Configuration) Server ¶
func (c *Configuration) Server(server string) *Configuration
Server sets transcoder server API address.
func (*Configuration) VideoPath ¶
func (c *Configuration) VideoPath(videoPath string) *Configuration
Server sets transcoder server API address.
Click to show internal directories.
Click to hide internal directories.