server

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	GinMode             string
	Addr                string
	LimitConnection     int
	DefaultHammerTime   time.Duration
	WriteLog            bool
	LogLevel            string
	LogFile             string
	DisableConsoleColor bool
	LimitConnections    int
	MaxHeaderBytes      uint
	ReadTimeout         time.Duration
	WriteTimeout        time.Duration
	IdleTimeout         time.Duration
	SyncSwitch          bool
	BlockCacheLimit     int
	TransCacheLimit     int
	DataBase            *common.DataBaseConfig
	Interval            time.Duration
}

Config server config

type ScanServer

type ScanServer struct {
	Server *http.Server
	G      *errgroup.Group
	// contains filtered or unexported fields
}

ScanServer hold instance of server

func GetServer

func GetServer(g *errgroup.Group, config *Config) (server *ScanServer)

GetServer init scanServer and return server instance

func (*ScanServer) RunServer

func (sl *ScanServer) RunServer()

RunServer Run our server in a goroutine

Jump to

Keyboard shortcuts

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