httpserver

package
v0.0.0-...-fed1f41 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server allows multiple locations to start the same HTTP server.

func NewServer

func NewServer(logger controller.Logger, port string, webAPIVersions, runnerAPIVersions []string) Server

NewServer returns a new Server.

func (*Server) Handle

func (s *Server) Handle(pattern string, handler http.Handler)

Handle wraps net/http.Handle.

func (*Server) HandleFunc

func (s *Server) HandleFunc(pattern string, handlerFunc func(http.ResponseWriter, *http.Request))

HandleFunc wraps net/http.HandleFunc.

func (*Server) Start

func (s *Server) Start(ctx *context.Context, wg *sync.WaitGroup)

Start starts the http server which will exit when ctx is closed. Calling Start more than once results in a no-op. The passed sync.WaitGroup should not have the Add method called before passing to Start.

Jump to

Keyboard shortcuts

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