xmux

package
v0.0.0-...-b804f52 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MulanPSL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ModName = "server.xmux"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr         string
	ReadTimeout  time.Duration
	WriteTimeout time.Duration

	SlowQueryThresholdInMilli time.Duration
}

Config HTTP config

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig ...

type Server

type Server struct {
	*mux.Router
	Server *http.Server
	// contains filtered or unexported fields
}

func Build

func Build() *Server

func (*Server) GracefulStop

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

func (*Server) Info

func (s *Server) Info() *server.ServiceInfo

func (*Server) Serve

func (s *Server) Serve() error

func (*Server) Stop

func (s *Server) Stop() error

Jump to

Keyboard shortcuts

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