service

package
v0.2.40 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(data *Data) *mux.Router

NewRouter creates the router for HTTP service

func StartWebServer

func StartWebServer(data *Data) error

StartWebServer starts the HTTP service and listens for the admin requests

Types

type Data

type Data struct {
	Port int

	Saver     FileSaver
	Estimator DurationEstimator
}

Data is service operation data

type DurationEstimator

type DurationEstimator interface {
	Seconds(name string) (float64, error)
}

DurationEstimator estimates file duration

type FileSaver

type FileSaver interface {
	Save(name string, reader io.Reader) (string, error)
}

FileSaver saves the file with the provided name

Jump to

Keyboard shortcuts

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