Documentation
¶
Index ¶
Constants ¶
View Source
const ( // XXX think about these durations DefaultClientIdleTimeout = 5 * time.Minute // Reap timer for client persistence DefaultRequestTimeout = 9 * time.Second // Smaller than 12s DefaultPollFrequency = 11 * time.Second // Smaller than 12s DefaultListenAddress = "localhost:8545" // Default geth port DefaultControlAddress = "localhost:1337" // Default control port RouteControlAdd = routeControl + "/add" RouteControlRemove = routeControl + "/remove" RouteControlList = routeControl + "/list" )
View Source
const EthereumVersion = "2.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ClientIdleTimeout time.Duration
ControlAddress string
HVMURLs []string
ListenAddress string
LogLevel string
Network string
PollFrequency time.Duration
PrometheusListenAddress string
PrometheusNamespace string
PprofListenAddress string
RequestTimeout time.Duration
}
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
type EthereumProxy ¶
type EthereumProxy struct {
// contains filtered or unexported fields
}
type EthereumRequest ¶
type EthereumRequest struct {
Version string `json:"jsonrpc"`
Method string `json:"method"`
Params []any `json:"params,omitempty"`
ID any `json:"id"`
}
EthereumRequest is a JSON-RPC request object. https://www.jsonrpc.org/specification
type EthereumResponse ¶
type EthereumResponse struct {
Version string `json:"jsonrpc"`
Result json.RawMessage `json:"result"`
Error json.RawMessage `json:"error,omitempty"`
ID any `json:"id"`
}
EthereumResponse is a JSON-RPC response object. https://www.jsonrpc.org/specification
func CallEthereum ¶
type HVMHandler ¶
type HVMHandler struct {
// contains filtered or unexported fields
}
type NodeHealth ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Collectors ¶
func (s *Server) Collectors() []prometheus.Collector
Collectors returns the Prometheus collectors available for the server.
Click to show internal directories.
Click to hide internal directories.