web

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 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 interface {
	Address() []string // first address is always HTTP and HTTPS is the second one, done that way as LetsEncrypt uses http for establishing connection
	Handler() http.Handler

	OnStart(callback func())
	OnStop(callback func())
	OnError(callback func(err error))

	Start(ctx context.Context, wg *sync.WaitGroup)
	Stop()
	Shutdown()
}

func New added in v1.0.2

func New(ports config.Ports, handler http.Handler, logger logger.Logger) (Server, error)

func NewFromConfig added in v1.0.5

func NewFromConfig(config *config.Http, handler http.Handler, logger logger.Logger) (Server, error)

func NewWithOverrides added in v1.0.2

func NewWithOverrides(ports config.Ports, cert *certificate.Certificate, handler http.Handler, timeout *config.Timeout, sessions *session.Provider, logger logger.Logger) (Server, error)

Jump to

Keyboard shortcuts

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