Documentation ¶
Index ¶
- type Config
- type Server
- func (s *Server) BlockchainHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) ConsensusHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetAccountHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetBlockByHashHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetBlockByHeightHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetTransactionHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetTxPoolContentHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetValidatorByNumberHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetValidatorHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) NetworkHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) NodeHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) RootHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) StartServer(grpcServer string) error
- func (s *Server) StopServer()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Enable bool `toml:"enable"` Listen string `toml:"listen"` EnablePprof bool `toml:"enable_pprof"` }
func DefaultConfig ¶
func DefaultConfig() *Config
func (*Config) BasicCheck ¶ added in v0.15.0
BasicCheck performs basic checks on the configuration.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) BlockchainHandler ¶
func (s *Server) BlockchainHandler(w http.ResponseWriter, r *http.Request)
func (*Server) ConsensusHandler ¶
func (s *Server) ConsensusHandler(w http.ResponseWriter, r *http.Request)
func (*Server) GetAccountHandler ¶
func (s *Server) GetAccountHandler(w http.ResponseWriter, r *http.Request)
GetAccountHandler returns a handler to get account by address.
func (*Server) GetBlockByHashHandler ¶
func (s *Server) GetBlockByHashHandler(w http.ResponseWriter, r *http.Request)
func (*Server) GetBlockByHeightHandler ¶
func (s *Server) GetBlockByHeightHandler(w http.ResponseWriter, r *http.Request)
func (*Server) GetTransactionHandler ¶
func (s *Server) GetTransactionHandler(w http.ResponseWriter, r *http.Request)
func (*Server) GetTxPoolContentHandler ¶ added in v1.3.0
func (s *Server) GetTxPoolContentHandler(w http.ResponseWriter, r *http.Request)
func (*Server) GetValidatorByNumberHandler ¶ added in v0.13.0
func (s *Server) GetValidatorByNumberHandler(w http.ResponseWriter, r *http.Request)
GetValidatorByNumberHandler returns a handler to get validator by number.
func (*Server) GetValidatorHandler ¶
func (s *Server) GetValidatorHandler(w http.ResponseWriter, r *http.Request)
GetValidatorHandler returns a handler to get validator by address.
func (*Server) NetworkHandler ¶
func (s *Server) NetworkHandler(w http.ResponseWriter, r *http.Request)
func (*Server) NodeHandler ¶ added in v0.13.0
func (s *Server) NodeHandler(w http.ResponseWriter, r *http.Request)
func (*Server) RootHandler ¶
func (s *Server) RootHandler(w http.ResponseWriter, r *http.Request)
func (*Server) StartServer ¶
func (*Server) StopServer ¶
func (s *Server) StopServer()
Click to show internal directories.
Click to hide internal directories.