services

package
v0.0.0-...-918d396 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterWebFlags

func RegisterWebFlags(c *cli.App)

RegisterWebFlags reigisters flags for web server

Types

type Transformer

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

Transformer generates previews for video content

func NewTransformer

func NewTransformer(sourceURL string, format string, width int) *Transformer

NewTransformer initializes new Transformer instance

func (*Transformer) Get

func (s *Transformer) Get() (io.Reader, error)

Get gets transformed image

type TransformerPool

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

TransformerPool ensures that only one specific preview is generating at time

func NewTransformerPool

func NewTransformerPool() *TransformerPool

NewTransformerPool initializes TransformerPool

func (*TransformerPool) Get

func (s *TransformerPool) Get(sourceURL string, format string, width int, infoHash string, path string, p string) *Transformer

Get gets Transformer

type Web

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

Web serves previews for video content

func NewWeb

func NewWeb(c *cli.Context, gp *TransformerPool) *Web

NewWeb initializes Web

func (*Web) Close

func (s *Web) Close()

Close closes web server

func (*Web) Serve

func (s *Web) Serve() error

Serve serves web server

Jump to

Keyboard shortcuts

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