api

package
v0.0.0-...-ce6788a Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiServer

type ApiServer struct {
	Config        *structures.APIConfig
	Stats         atomic.Value
	StatsIntv     time.Duration
	GravDBBackend *store.GravitonStore
	BBSBackend    *store.BboltStore
	DBType        string
}

func NewApiServer

func NewApiServer(cfg *structures.APIConfig, gravdbbackend *store.GravitonStore, bbsbackend *store.BboltStore, dbtype string) *ApiServer

Configures a new API server to be used

func (*ApiServer) GetInfo

func (apiServer *ApiServer) GetInfo(writer http.ResponseWriter, _ *http.Request)

func (*ApiServer) InvalidSCIDStats

func (apiServer *ApiServer) InvalidSCIDStats(writer http.ResponseWriter, _ *http.Request)

func (*ApiServer) InvokeIndexBySCID

func (apiServer *ApiServer) InvokeIndexBySCID(writer http.ResponseWriter, r *http.Request)

func (*ApiServer) InvokeSCVarsByHeight

func (apiServer *ApiServer) InvokeSCVarsByHeight(writer http.ResponseWriter, r *http.Request)

func (*ApiServer) MBLLookupAll

func (apiServer *ApiServer) MBLLookupAll(writer http.ResponseWriter, r *http.Request)

func (*ApiServer) MBLLookupByAddr

func (apiServer *ApiServer) MBLLookupByAddr(writer http.ResponseWriter, r *http.Request)

func (*ApiServer) MBLLookupByHash

func (apiServer *ApiServer) MBLLookupByHash(writer http.ResponseWriter, r *http.Request)

func (*ApiServer) NormalTxWithSCID

func (apiServer *ApiServer) NormalTxWithSCID(writer http.ResponseWriter, r *http.Request)

func (*ApiServer) Start

func (apiServer *ApiServer) Start()

Starts the api server

func (*ApiServer) StatsIndex

func (apiServer *ApiServer) StatsIndex(writer http.ResponseWriter, _ *http.Request)

Jump to

Keyboard shortcuts

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