rest

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2022 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockTimeHandler

func BlockTimeHandler(blockmetaClient *pbblockmeta.Client) http.Handler

func GetBlockHandler

func GetBlockHandler(db eosws.DB) http.Handler

func GetBlockTransactionsHandler

func GetBlockTransactionsHandler(db eosws.DB) http.Handler

func GetBlocksHandler

func GetBlocksHandler(db eosws.DB) http.Handler

func GetCompletionHandler

func GetCompletionHandler(completionInstance completion.Completion) http.Handler

func GetKeyAccounts

func GetKeyAccounts(stateClient pbstatedb.StateClient) http.Handler

func GetTransactionHandler

func GetTransactionHandler(db eosws.DB) http.Handler

func HealthzHandler

func HealthzHandler(hub *hub.SubscriptionHub, api *zsw.API, blocksStore dstore.Store, db eosws.DB, stateClient pbstatedb.StateClient, searchEngine *eosws.SearchEngine, expectedSecret string) http.Handler

func ListTransactionsHandler

func ListTransactionsHandler(db eosws.DB) http.Handler

func NewReverseProxy

func NewReverseProxy(target *url.URL, stripQuerystring bool, dmeteringKind string, retries int, timeoutPerReq time.Duration) http.Handler

func PingHandler

func PingHandler(w http.ResponseWriter, r *http.Request)

func SearchNotStuckHandler

func SearchNotStuckHandler(searchEngine *eosws.SearchEngine) http.Handler

func SimpleSearchHandler

func SimpleSearchHandler(db eosws.DB, blockmetaClient *pbblockmeta.Client) http.Handler

Types

type GetAccountByPubKeyResponses

type GetAccountByPubKeyResponses struct {
	BlockNum     uint32   `json:"block_num"`
	AccountNames []string `json:"account_names"`
}

type Healthz

type Healthz struct {
	Errors  []string `json:"errors"`
	Hub     *Hub     `json:"hub,omitempty"`
	TRXDB   *TRXDB   `json:"trxdb,omitempty"`
	StateDB *StateDB `json:"statedb,omitempty"`
	Search  *Search  `json:"search,omitempty"`
	Merger  *Merger  `json:"merger,omitempty"`
	Healthy struct {
		Hub     *bool `json:"hub,omitempty"`
		Merger  *bool `json:"merger,omitempty"`
		TRXDB   *bool `json:"trxdb,omitempty"`
		SatetDB *bool `json:"statedb,omitempty"`
		Search  *bool `json:"search,omitempty"`
	} `json:"healthy"`
}

type Hub

type Hub struct {
	HeadBlockNum   uint32    `json:"head_block_num"`
	HeadBlockTime  time.Time `json:"head_block_time"`
	TimeLatencySec int64     `json:"time_latency_sec"`
}

type Merger

type Merger struct {
	LastMergedBlock uint32 `json:"last_merged_block"`
	BlockLatency    int    `json:"block_latency"`
}

type PushResponse

type PushResponse struct {
	TransactionID string          `json:"transaction_id"`
	BlockID       string          `json:"block_id"`
	BlockNum      uint32          `json:"block_num"`
	Processed     json.RawMessage `json:"processed"`
}

type ReverseProxy

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

func (*ReverseProxy) ServeHTTP

func (p *ReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Search struct {
	HeadBlock    uint32 `json:"head_block"`
	BlockLatency int    `json:"block_latency"`
}

type StateDB

type StateDB struct {
	HeadBlock    uint32 `json:"head_block"`
	BlockLatency int    `json:"block_latency"`
}

type TRXDB

type TRXDB struct {
	HeadBlock    uint32 `json:"head_block"`
	BlockLatency int    `json:"block_latency"`
}

type TxPushRouter

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

func NewTxPushRouter

func NewTxPushRouter(dumbAPIProxy http.Handler, pushTransactionHandler http.Handler) *TxPushRouter

func (*TxPushRouter) ServeHTTP

func (t *TxPushRouter) ServeHTTP(w http.ResponseWriter, r *http.Request)

type TxPusher

type TxPusher struct {
	API *zsw.API
	// contains filtered or unexported fields
}

func NewTxPusher

func NewTxPusher(API *zsw.API, subscriptionHub *hub.SubscriptionHub, headInfoHub *eosws.HeadInfoHub, retries int, extraAPIs []*zsw.API) *TxPusher

func (*TxPusher) ServeHTTP

func (t *TxPusher) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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