api

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateV1DownloadHandler

func CreateV1DownloadHandler(fetchMetadata files.MetadataFetcher, downloadFileFromBucket files.FileDownloader, cfg *config.Config) http.HandlerFunc

CreateV1DownloadHandler handles generic download file requests.

func Limiter added in v1.16.1

func Limiter(n int) func(http.Handler) http.Handler

Limiter is a middleware that makes sure that no more than n handlers are being executed in parallel.

If more traffic comes in while all n handlers are running, the Limiter drops the extra requests by returning HTTP status code of 429 (Too Many Requests) and never executing the inner handler.

If n is 0, no concurrency limits are applied at all.

func RedirectLocation

func RedirectLocation(cfg *config.Config, filePath string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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