core

package
v0.0.0-...-f34ac1a Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2018 License: LGPL-3.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 EngineConfig

type EngineConfig struct {
	DisableConsoleColor bool // disable the console color
	WriteLog            bool
	LogFile             string
	TempFolder          string
	LimitConnections    int
	Routers             []gin.IRoutes
}

EngineConfig gin engine config

func (*EngineConfig) Init

func (config *EngineConfig) Init() http.Handler

Init engine init

type MonitorServer

type MonitorServer struct {
	Server   *http.Server
	CertFile string
	KeyFile  string
	G        *errgroup.Group
}

MonitorServer monitor server config

func GetServer

func GetServer(g *errgroup.Group, handlerConfig ...*EngineConfig) (slServer *MonitorServer)

GetServer config and return the MonitorServer

func (*MonitorServer) NewServer

func (sl *MonitorServer) NewServer(server *http.Server, g *errgroup.Group)

NewServer create new MonitorServer with http.Server and errgroup.Group

func (*MonitorServer) NewServerTLS

func (sl *MonitorServer) NewServerTLS(server *http.Server, certFile string, keyFile string, g *errgroup.Group)

NewServerTLS create new SSL MonitorServer with http.Server, errgroup.Group and TLS config file

func (*MonitorServer) RunServer

func (sl *MonitorServer) RunServer()

RunServer run our server in a goroutine so that it doesn't block.

func (*MonitorServer) RunServerTLS

func (sl *MonitorServer) RunServerTLS()

RunServerTLS run our server with tls in a goroutine so that it doesn't block.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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