http

package
v0.0.0-...-5f71cfe Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: BSD-3-Clause 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 NewHttpServer

func NewHttpServer(config *s.HttpServerConfig, accountManager s.AccountManager) *Server

NewHttpServer creates a new HTTP server (without HTTPS)

func NewHttpsServer

func NewHttpsServer(
	config *s.HttpServerConfig,
	certManager *autocert.Manager,
	accountManager s.AccountManager,
) *Server

NewHttpsServer creates a new HTTPs server (with HTTPS support) and a certManager that is responsible for generating and renewing Let's Encrypt certificate The listening address will be :443 no matter what was specified in s.HttpServerConfig.Address

func NewHttpsServerWithTLSConfig

func NewHttpsServerWithTLSConfig(
	config *s.HttpServerConfig,
	tlsConfig *tls.Config,
	accountManager s.AccountManager,
) *Server

NewHttpsServerWithTLSConfig creates a new HTTPs server with a provided tls.Config. Usually used when you already have a certificate

func (*Server) Start

func (s *Server) Start() error

Start defines http handlers and starts the http server. Blocks until server is shutdown.

func (*Server) Stop

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

Stop stops the http server

Directories

Path Synopsis
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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