Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockHash ¶
type BlockHash interface {
Get() string
}
BlockHash will get the latest block hash from the ethereum blockchain
func NewChanneledBlockHash ¶
func NewChanneledBlockHash(channel channels.ConsumerChannel) BlockHash
NewChanneledBlockHash returns a BlockHash given a ConsumerChannel
func NewRedisBlockHash ¶
NewRedisBlockHash constructs a ConsumerChannel from a channelURI and a redisClient
type ChanneledBlockHash ¶
type ChanneledBlockHash struct {
// contains filtered or unexported fields
}
ChanneledBlockHash is a BlockHash implementation that gets the latest block hash by watching a ConsumerChannel
func (*ChanneledBlockHash) Get ¶
func (rbh *ChanneledBlockHash) Get() string
Get retrieves the blockhash from the monitoring go routine
func (*ChanneledBlockHash) Start ¶
func (rbh *ChanneledBlockHash) Start()
Start kicks off a go routine to listen for changes to the blockhash
type ChanneledBlockHashConsumer ¶
type ChanneledBlockHashConsumer struct {
// contains filtered or unexported fields
}
ChanneledBlockHashConsumer listens to a consumerChannel for block hashes, and sends them over provided channel
func (*ChanneledBlockHashConsumer) Consume ¶
func (rbhc *ChanneledBlockHashConsumer) Consume(delivery channels.Delivery)
Consume processes blockhashes as they arrive from the provided consumer channel