Documentation ¶
Index ¶
Constants ¶
View Source
const RPC_TIMEOUT = time.Duration(5 * time.Second)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EthManager ¶
type EthManager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(ethJsonRPC string, pollInterval, maxQueries, redoQueryTime int, dbMap *gorp.DbMap) *EthManager
func (*EthManager) LastBlockLoop ¶
func (e *EthManager) LastBlockLoop()
LastBlockLoop is a simple loop that polls the eth json rpc for the latest block (height of the network), getting a block number in return, which stores alongside the timestamp of such received number. Eventually this service will be horizontally scaled, meaning that we must retrieve several "last block" values from the shared db and determine whether we can count with an actual number, or we should poll again.
func (*EthManager) RpcDispatcherLoop ¶
func (e *EthManager) RpcDispatcherLoop()
RpcDispatcherLoop obtains ethereum data from the clients by reading the "wantfromdevp2p" table and dispatching queries. Succesful results are stored into the "ethdata" table, for further processing
Click to show internal directories.
Click to hide internal directories.