Documentation ¶
Index ¶
- Constants
- type Events
- type HTTPServer
- type Handler
- type JSONRPC
- func (j *JSONRPC) RegisterBlockEndpoints(db block.Storage)
- func (j *JSONRPC) RegisterGasEndpoints(db gas.Storage)
- func (j *JSONRPC) RegisterHandler(method string, handler Handler)
- func (j *JSONRPC) RegisterSubEndpoints(db storage.Storage)
- func (j *JSONRPC) RegisterTxEndpoints(db tx.Storage)
- func (j *JSONRPC) SetupRoutes(mux *chi.Mux) *chi.Mux
- func (j *JSONRPC) UnregisterHandler(method string)
- type Option
Constants ¶
View Source
const (
DefaultListenAddress = "0.0.0.0:8546"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Events ¶
type Events interface { // Subscribe subscribes to specific events Subscribe([]events.Type) *events.Subscription // CancelSubscription cancels the given subscription CancelSubscription(events.SubscriptionID) }
Events is the interface for event passing
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
func NewHTTPServer ¶
type JSONRPC ¶
type JSONRPC struct {
// contains filtered or unexported fields
}
JSONRPC is the JSONRPC server instance, that is capable of handling both HTTP and WS requests
func NewJSONRPC ¶
NewJSONRPC creates a new instance of the JSONRPC server
func (*JSONRPC) RegisterBlockEndpoints ¶
RegisterBlockEndpoints registers the block endpoints
func (*JSONRPC) RegisterGasEndpoints ¶ added in v0.5.3
RegisterGasPriceEndpoints registers the gas price endpoints
func (*JSONRPC) RegisterHandler ¶
RegisterHandler registers a new method handler, overwriting existing ones, if any
func (*JSONRPC) RegisterSubEndpoints ¶
func (*JSONRPC) RegisterTxEndpoints ¶
RegisterTxEndpoints registers the transaction endpoints
func (*JSONRPC) SetupRoutes ¶
func (j *JSONRPC) SetupRoutes(mux *chi.Mux) *chi.Mux
SetupRoutes sets up the request router for the indexer service
func (*JSONRPC) UnregisterHandler ¶
UnregisterHandler removes the method handler for the specified method, if any
Click to show internal directories.
Click to hide internal directories.