master_gin

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: LGPL-2.1 Imports: 7 Imported by: 0

README

master-gin

Run http server written by gin in the master framework

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "1.0.0"
)

Functions

This section is empty.

Types

type AcceptFunc added in v1.0.0

type AcceptFunc func(net.Conn)

type CloseFunc added in v1.0.0

type CloseFunc func(net.Conn)

type GinServ added in v0.9.2

type GinServ struct {
	Listener net.Listener
	Engine   *gin.Engine
}

type GinService

type GinService struct {
	Alone         bool
	Servers       []*GinServ
	AcceptHandler AcceptFunc
	CloseHandler  CloseFunc
}

func Init

func Init(addresses string, stopHandler func(bool)) (*GinService, error)

Init Create the gin service when starting in alone or daemon mode; The addresses must not be empty in alone mode, and will be ignored in daemon mode, the addresses' format lookup like "127.0.0.1:8080;127.0.0.1:8081;127.0.0.1:8082"; The stopHandler is the callback when the process is exiting.

func (*GinService) Run

func (service *GinService) Run()

Run begin to start all the listening servers after Init() called.

Directories

Path Synopsis
examples
gin-server command

Jump to

Keyboard shortcuts

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