httpserver

package
v0.0.0-...-56d8f82 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2024 License: MIT Imports: 11 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
}

func NewServer

func NewServer(config *ServerConfig) *Server

NewServer creates a new HTTP server using the provded config.

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

type ServerConfig

type ServerConfig struct {
	Handler http.Handler

	// If EnableACME flag is this option is ignored.
	Port int

	// If EnableACME is true, then the server will use Let's Encrypt to automatically.
	EnableACME bool
	ACMEHosts  []string
}

Jump to

Keyboard shortcuts

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