server

package
v0.0.0-...-760d706 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 13 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 represents an HTTP server that uses net/http ServeMux to route requests Originally done with chi, but a migration to the new net/http patterns seems like a good choice to reduce dependencies, but does mean middleware needs to be implemented in the server

func New

func New(listen string, port int, cluster *cluster.Cluster) *Server

New creates a new HTTP Server instance. Requires the IP and port number to bind to

func (*Server) Start

func (s *Server) Start()

Start starts the server and initializes the router and common middleware

Jump to

Keyboard shortcuts

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