server

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChiHandler

func NewChiHandler() chi.Router

Types

type HttpServer

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

func NewHttpServer

func NewHttpServer(handler http.Handler, opts ...Option) *HttpServer

func (*HttpServer) Address

func (hs *HttpServer) Address() string

func (*HttpServer) Start

func (hs *HttpServer) Start() error

func (*HttpServer) Stop

func (hs *HttpServer) Stop() error

func (*HttpServer) String

func (s *HttpServer) String() string

type Option

type Option func(o *Options)

func Hostname

func Hostname(h string) Option

func Port

func Port(p int) Option

func ShutdownTimeout

func ShutdownTimeout(t int) Option

func TLS

func TLS(certFile string, keyFile string) Option

type Options

type Options struct {
	Hostname        string
	Port            int
	CertificateFile string
	KeyFile         string
	ShutdownTimeout int
}

Jump to

Keyboard shortcuts

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