server

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: LGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HandlerGetURIs get uris, many at once, to keep it fast
	HandlerGetURIs Handler = "getURIs"
	// HandlerGetContent get (site) content
	HandlerGetContent = "getContent"
	// HandlerGetNodes get nodes
	HandlerGetNodes = "getNodes"
	// HandlerUpdate update repo
	HandlerUpdate = "update"
	// HandlerGetRepo get the whole repo
	HandlerGetRepo = "getRepo"

	// DefaultRepositoryTimeout for the HTTP client towards the repo
	DefaultRepositoryTimeout = 2 * time.Minute
)

Variables

This section is empty.

Functions

func NewWebServer

func NewWebServer(path string, r *repo.Repo) http.Handler

NewWebServer returns a shiny new web server

func Run

func Run(server string, address string, varDir string, pollUpdates bool) error

Run - let it run and enjoy on a socket near you

func RunServerSocketAndWebServer

func RunServerSocketAndWebServer(
	server string,
	address string,
	webserverAddress string,
	webserverPath string,
	varDir string,
	repositoryTimeout time.Duration,
	pollForUpdates bool,
) error

Types

type Handler

type Handler string

Handler type

Jump to

Keyboard shortcuts

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