server

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithHTTP

func WithHTTP(baseAddress string, port int) serverOption

func WithHTTPListner

func WithHTTPListner(listner Listner) serverOption

func WithHTTPS

func WithHTTPS(baseAddress string, port int) serverOption

func WithHTTPSListner

func WithHTTPSListner(listner Listner) serverOption

func WithRequstPropceessor

func WithRequstPropceessor(requestProcessor *processor.RequestProcessor) serverOption

func WithSslCert

func WithSslCert(cert string) serverOption

func WithSslKey

func WithSslKey(key string) serverOption

Types

type Listner

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

type Server

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

func NewServer

func NewServer(options ...serverOption) *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