webserver

package
v0.0.0-...-f30a169 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GetBlockByHeight       = "GetBlockByHeight"       // nolint http://localhost:8080/GetBlockByHeight?fromRemote=false&chainId=chain1&height=1
	GetBlockByHash         = "GetBlockByHash"         // nolint http://localhost:8080/GetBlockByHash?fromRemote=false&chainId=chain1&blockHash=xxx
	GetBlockByTxId         = "GetBlockByTxId"         // nolint http://localhost:8080/GetBlockByTxId?fromRemote=false&chainId=chain1&txId=xxx
	GetLastBlock           = "GetLastBlock"           // nolint http://localhost:8080/GetLastBlock?fromRemote=false&chainId=chain1
	GetTransactionByTxId   = "GetTransactionByTxId"   // nolint http://localhost:8080/GetTransactionByTxId?fromRemote=false&chainId=chain1&txId=xxx
	GetTransactionTotalNum = "GetTransactionTotalNum" // nolint http://localhost:8080/GetTransactionTotalNum?chainId=chain1
	GetBlockTotalNum       = "GetBlockTotalNum"       // nolint http://localhost:8080/GetBlockTotalNum?chainId=chain1
	GetCurrentBlockHeight  = "GetCurrentBlockHeight"  // nolint http://localhost:8080/GetCurrentBlockHeight?chainId=chain1
	ValidTransaction       = "ValidTransaction"       // nolint http://localhost:8080/ValidTransaction

)

Variables

This section is empty.

Functions

This section is empty.

Types

type WebServer

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

WebServer is a web listener of web for SPV and light node

func NewWebServer

func NewWebServer(spvSer *server.SPVServer) *WebServer

NewWebServer creates a instance of web server

func (*WebServer) Start

func (ws *WebServer) Start() error

Start starts up web server

func (*WebServer) Stop

func (ws *WebServer) Stop() error

Stop stops web server

Jump to

Keyboard shortcuts

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