httpserver

package
v1.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: GPL-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 AccountMapData

type AccountMapData struct {
	MapList map[string]*types.AccountMap `json:"accountmaplist"`
}

type BaseServer

type BaseServer struct {
	HttpServer *http.Server
}

func NewBaseServer

func NewBaseServer(strategy *emtTypes.Strategy) *BaseServer

type Encourage

type Encourage struct {
	TotalBalance          *big.Int `json:"initialTotalBalance"`
	EncourageAverageBlock *big.Int `json:"encourageAverageBlock"`
}

type HandlersFunc

type HandlersFunc func(http.ResponseWriter, *http.Request)

type PTableAll

type PTableAll struct {
	NextCandidateValidators []*Validator `json:"nextValidators"`

	AccountMapList *types.AccountMapList `json:"accountMap"`

	PosItemMap map[common.Address]*types.PosItem `json:"posTableMap"`

	Success bool `json:"success"`
}

type PosItemMapData

type PosItemMapData struct {
	PosItemMap   map[common.Address]*types.PosItem `json:"posTableMap"`
	Threshold    *big.Int                          `json:"threshold"`
	PosArraySize int                               `json:"posArraySize"`
}

type PreBlockProposer

type PreBlockProposer struct {
	PreBlockProposer string         `json:"proposer"`
	Beneficiary      common.Address `json:"beneficiary"`
	Signer           common.Address `json:"signer"`
}

type PreBlockValidatorElect

type PreBlockValidatorElect struct {
	PreBlockValidators []*Validator `json:"preBlockValidators"`
}

type THandler

type THandler struct {
	HandlersMap map[string]HandlersFunc
	// contains filtered or unexported fields
}

func NewTHandler

func NewTHandler(strategy *emtTypes.Strategy) *THandler

func (*THandler) GetAccountMapData

func (tHandler *THandler) GetAccountMapData(w http.ResponseWriter, req *http.Request)

This function will return the used data structure

func (*THandler) GetAllCandidateValidatorPool

func (tHandler *THandler) GetAllCandidateValidatorPool(w http.ResponseWriter, req *http.Request)

func (*THandler) GetEncourage

func (tHandler *THandler) GetEncourage(w http.ResponseWriter, req *http.Request)

func (*THandler) GetInitialValidator

func (tHandler *THandler) GetInitialValidator(w http.ResponseWriter, req *http.Request)

func (*THandler) GetNextAccountMapData

func (tHandler *THandler) GetNextAccountMapData(w http.ResponseWriter, req *http.Request)

This function will return the used data structure

func (*THandler) GetNextAllCandidateValidatorPool

func (tHandler *THandler) GetNextAllCandidateValidatorPool(w http.ResponseWriter, req *http.Request)

func (*THandler) GetNextPosTableData

func (tHandler *THandler) GetNextPosTableData(w http.ResponseWriter, req *http.Request)

This function will return the used data structure

func (*THandler) GetPosTableData

func (tHandler *THandler) GetPosTableData(w http.ResponseWriter, req *http.Request)

This function will return the used data structure

func (*THandler) GetPreBlockProposer

func (tHandler *THandler) GetPreBlockProposer(w http.ResponseWriter, req *http.Request)

This function will return the used data structure

func (*THandler) GetPreBlockValidators

func (tHandler *THandler) GetPreBlockValidators(w http.ResponseWriter, req *http.Request)

This function will return the used data structure

func (*THandler) Hello

func (tHandler *THandler) Hello(w http.ResponseWriter, req *http.Request)

func (*THandler) IsRemove

func (tHandler *THandler) IsRemove(w http.ResponseWriter, req *http.Request)

This function will return the used data structure

func (*THandler) IsUpsert

func (tHandler *THandler) IsUpsert(w http.ResponseWriter, req *http.Request)

This function will return the used data structure

func (*THandler) RegisterFunc

func (tHandler *THandler) RegisterFunc()

func (*THandler) ServeHTTP

func (tHandler *THandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Validator

type Validator struct {
	Address       []byte           `json:"address"`
	PubKey        abciTypes.PubKey `json:"pubKey"`
	Power         int64            `json:"power"`
	AddressString string           `json:"addressString"`
	Signer        common.Address   `json:"signer"`
	SignerBalance *big.Int         `json:"signerBalance"`
	Beneficiary   common.Address   `json:"beneficiary"`
}

Jump to

Keyboard shortcuts

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