server

package module
v0.0.0-...-d223bfa Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: MIT Imports: 10 Imported by: 1

README

server

A FAIRE.

Licence

MIT.


Copyright (c) 2021 losyme.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port         int
	TLS          *TLS
	IdleTimeout  time.Duration
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

type Server

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

func New

func New(cfg *Config, handler http.Handler, logger *log.Logger) (*Server, error)

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

func (*Server) Shutdown

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

type TLS

type TLS struct {
	Host     string
	Cert     string
	Key      string
	AuthType int
	CA       string
}

Jump to

Keyboard shortcuts

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