Documentation ¶
Index ¶
Constants ¶
View Source
const ( BlockServiceName = "block-subscriber" BlockQuery = "tm.event = 'NewBlock'" ChanelCap = 100 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockNotifier ¶
type BlockSubscriber ¶
type BlockSubscriber struct {
// contains filtered or unexported fields
}
BlockSubscriber subscribes to the NewBlock events on the tendermint core. New blocks indexes will be pushed to the timer and used in future for session timestamping
func NewBlockSubscriber ¶
func NewBlockSubscriber(timer *Timer, tendermint *http.HTTP, log *logan.Entry) *BlockSubscriber
NewBlockSubscriber creates the subscriber instance for listening new blocks
func (*BlockSubscriber) Run ¶
func (b *BlockSubscriber) Run(ctx context.Context)
type Timer ¶
type Timer struct {
// contains filtered or unexported fields
}
Timer provides the source for timestamping all operations in the tss system. Use Notifier to receive notification about new blocks in your service
func (*Timer) CurrentBlock ¶
func (*Timer) SubscribeToBlocks ¶
func (t *Timer) SubscribeToBlocks(name string, f BlockNotifier)
SubscribeToBlocks adds receiver method to notify fot the new block events
Click to show internal directories.
Click to hide internal directories.