server

package
v0.0.0-...-15d0f99 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr         string        `dm:"addr"`
	IdleTimeout  time.Duration `dm:"idle_timeout"`
	ReadTimeout  time.Duration `dm:"read_timeout"`
	WriteTimeout time.Duration `dm:"write_timeout"`
	CertFile     string        `dm:"cert_file"`
	KeyFile      string        `dm:"key_file"`
	CAFile       string        `dm:"ca_file"`
}

type Params

type Params struct {
	Config  *Config
	Handler http.Handler // Required
	Logger  *log.Logger
}

type Server

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

func New

func New(p *Params) (*Server, error)

func (*Server) Addr

func (s *Server) Addr() string

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

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

func (*Server) TLS

func (s *Server) TLS() bool

Jump to

Keyboard shortcuts

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