server

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: Apache-2.0, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MetricsMiddleware added in v0.4.0

func MetricsMiddleware(cfg *config.Config) gin.HandlerFunc

MetricsMiddleware logs the execution time of every request

func RollbarMiddleware added in v0.5.0

func RollbarMiddleware() gin.HandlerFunc

RollbarMiddleware reports panics to Rollbar

Types

type Server

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

Server handles HTTP requests

func New

func New(cfg *config.Config, store *store.Store, client *client.Client) (*Server, error)

New creates an HTTP server

func (*Server) GetAccount

func (s *Server) GetAccount(c *gin.Context)

GetAccount returns account details

func (*Server) GetAccountTransactions

func (s *Server) GetAccountTransactions(c *gin.Context)

GetAccountTransactions returns account transactions

func (*Server) GetEvents

func (s *Server) GetEvents(c *gin.Context)

GetEvents lists all events

func (*Server) GetHealth added in v0.2.0

func (s *Server) GetHealth(c *gin.Context)

GetHealth checks the health of the indexer

func (*Server) GetMiner

func (s *Server) GetMiner(c *gin.Context)

GetMiner returns storage miner details

func (*Server) GetMinerEvents

func (s *Server) GetMinerEvents(c *gin.Context)

GetMinerEvents lists storage miner events

func (*Server) GetMiners

func (s *Server) GetMiners(c *gin.Context)

GetMiners lists all storage miners

func (*Server) GetStatus added in v0.2.0

func (s *Server) GetStatus(c *gin.Context)

GetStatus returns the synchronization status

func (*Server) GetTopMiners

func (s *Server) GetTopMiners(c *gin.Context)

GetTopMiners lists top 100 storage miners

func (*Server) GetTransactions

func (s *Server) GetTransactions(c *gin.Context)

GetTransactions lists all transactions

func (*Server) Start

func (s *Server) Start() error

Start runs the server

Jump to

Keyboard shortcuts

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