server

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Started = iota
	Running
	Shutdown
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ServerWrapper

type ServerWrapper struct {
	State  uint8 // 服务启动状态
	Server *http.Server
	// contains filtered or unexported fields
}

封装

func NewServerWrapper

func NewServerWrapper(server *http.Server) *ServerWrapper

func (*ServerWrapper) ListenAndServe

func (s *ServerWrapper) ListenAndServe()

func (*ServerWrapper) ListenAndServes

func (s *ServerWrapper) ListenAndServes(certFile, keyFile string)

func (*ServerWrapper) Prepare

func (s *ServerWrapper) Prepare()

func (*ServerWrapper) Shutdown

func (s *ServerWrapper) Shutdown()

Jump to

Keyboard shortcuts

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