server

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	*gin.Engine
	Server *http.Server
	// contains filtered or unexported fields
}

Server http server

func New

func New(cfg *config.ServerConfig) *Server

New returns a http server instance

func (*Server) Start

func (s *Server) Start() net.Addr

Start server

func (*Server) Stop

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

Stop shutdown server graceful

func (*Server) Upgrade

func (s *Server) Upgrade(ws *websocket.WebSocket) gin.IRoutes

Upgrade upgrade http to websocket

Jump to

Keyboard shortcuts

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