server

package
v0.0.0-...-808d7f4 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Set = wire.NewSet(
	New,
	Params{},
)

Set is a Wire provider set that produces a *Server.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr         string
	ServeTimeout time.Duration
}

Config is configurations for the HTTP server.

type Params

type Params struct {
	Config Config
}

Params is a set of parameters for New.

type Server

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

Server is a http server with basic functionalities.

func New

func New(params *Params) *Server

New creates a new server.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

ListenAndServe starts the server.

Jump to

Keyboard shortcuts

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