webserver

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthCheck

func HealthCheck(w http.ResponseWriter, _ *http.Request)

HealthCheck is the health check endpoint

Types

type WebServer

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

WebServer is the web server

func NewWebServer

func NewWebServer(authorsSvc *authors.AuthorService) (*WebServer, error)

NewWebServer creates a new web server

func (*WebServer) SetListenAddr

func (w *WebServer) SetListenAddr(addr string)

SetListenAddr sets the listen address (format expected: ":3000") It won't restart the webserver if it's already running

func (*WebServer) Shutdown

func (w *WebServer) Shutdown(ctx context.Context) error

Shutdown shuts down the web server

func (*WebServer) Start

func (w *WebServer) Start() error

Start shuts down the web server

Jump to

Keyboard shortcuts

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