api

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Server  *http.Server
	Storage *storage.Storage
	Logger  klog.Logger
}

API represents the api server.

func New

func New(s *storage.Storage, host string, port int, heartbeatPath string,
	logger klog.Logger) *API

New creates a new API server, listening on the given host & port.

func (*API) ServeHTTP

func (as *API) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP enqueues new downloads to the backend Redis instance

Jump to

Keyboard shortcuts

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