server

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chain

func Chain(h http.HandlerFunc, m ...middleware) http.HandlerFunc

func DecodeJSONBody

func DecodeJSONBody[T any]() middleware

func EnableProfiling

func EnableProfiling(mux *http.ServeMux)

func InitMux

func InitMux(
	scrapeServer *scrapeServer,
) (*http.ServeMux, error)

func MaxBytes

func MaxBytes(n int64) middleware

func NewScrapeServer

func NewScrapeServer(
	ctx context.Context,
	sf store.Factory,
	clientFactory fetch.Factory,
	headlessFetcher fetch.URLFetcher,

) (*scrapeServer, error)

When the context passed here is cancelled, the associated fetcher will close and release any resources they have open.

Types

type BatchRequest

type BatchRequest struct {
	Urls []string `json:"urls"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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