server

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener added in v0.0.4

type Listener interface {
	ListenAndServe() error
	ListenAndServeTLS(certFile, keyFile string) error
	Shutdown(ctx context.Context) error
}

type Option added in v0.0.4

type Option = func(s *Server)

func WithHTTP

func WithHTTP(baseAddress string, port int) Option

func WithHTTPListener added in v0.0.4

func WithHTTPListener(listener Listener) Option

func WithHTTPS

func WithHTTPS(baseAddress string, port int) Option

func WithHTTPSListener added in v0.0.4

func WithHTTPSListener(listener Listener) Option

func WithRequestProcessor added in v0.0.4

func WithRequestProcessor(requestProcessor *processor.RequestProcessor) Option

func WithSslCert

func WithSslCert(cert string) Option

func WithSslKey

func WithSslKey(key string) Option

type Server

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

func NewServer

func NewServer(options ...Option) *Server

func (*Server) ListenAndServe

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

Jump to

Keyboard shortcuts

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