server

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpServer

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

func New

func New(setters ...Setter) (*HttpServer, error)

func (*HttpServer) Close

func (s *HttpServer) Close()

func (*HttpServer) Run

func (s *HttpServer) Run()

func (*HttpServer) Running

func (s *HttpServer) Running() bool

type Option

type Option struct {
	Addr            string
	ShutdownTimeout time.Duration
}

type Setter

type Setter func(server *HttpServer) error

func WithEngine

func WithEngine(engine *gin.Engine) Setter

func WithLogger

func WithLogger(logger *zap.Logger) Setter

func WithOption

func WithOption(option *Option) Setter

Directories

Path Synopsis
controller
model

Jump to

Keyboard shortcuts

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