httpx

package
v0.0.0-...-ed0dbbb Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GinServer

type GinServer struct {

	// Router is the gin engine.
	Router *gin.Engine
	// contains filtered or unexported fields
}

GinServer is an HTTP server.

func NewGinServer

func NewGinServer(app *configx.Application, init InitRoutes) (*GinServer, error)

NewGinServer is used to create a new HTTP server.

func (*GinServer) GetAddr

func (s *GinServer) GetAddr() string

GetAddr is used to get the server address.

func (*GinServer) Start

func (s *GinServer) Start(ctx contextx.Contextx) error

Start starts the server.

func (*GinServer) Stop

func (s *GinServer) Stop(ctx contextx.Contextx) error

Stop halts the server.

type InitRoutes

type InitRoutes func(router *gin.Engine)

InitRoutes is a function to initialize routes.

Jump to

Keyboard shortcuts

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