httpgo

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CfgParamCoreAPI     = "CoreAPI"
	CfgParamCoreXPXNode = "XPXNode"
	CfgParamNetworkType = "networkType"
)

congig params in restMux

Variables

This section is empty.

Functions

This section is empty.

Types

type CfgHttp

type CfgHttp struct {
	// list tokens to check requests
	KillSignal int              `yaml:"KillSignal"`
	Server     *fasthttp.Server `yaml:"Server"`
}

CfgHttp has some options for Acceptor work

func NewCfgHttp

func NewCfgHttp(filename string) (cfgGlobal *CfgHttp, err error)

NewCfgHttp create CfgHttp from config file

type HttpGo

type HttpGo struct {
	// contains filtered or unexported fields
}

HttpGo implement rest api http/https server for operation with storage

func NewHttpgo

func NewHttpgo(cfg *CfgHttp, listener net.Listener, apis *apis.Apis) *HttpGo

NewHttpgo get configuration option from cfg listener to receive requests

func (*HttpGo) Run

func (a *HttpGo) Run(secure bool, certFile, keyFile string) error

Run starting http or https server according to secure certFile and keyFile are paths to TLS certificate and key files for https server

Jump to

Keyboard shortcuts

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