watcher

package
v0.0.0-...-de21b2d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Watcher

type Watcher struct {
	BlockStream <-chan watcher.Block
	Queue       chan<- watcher.Block
}

Watcher is a wrapper around two channels: first one (block stream) for getting and preprocessing blocks second (Queue) for sending them somewhere else for further processing

func NewWatcher

func NewWatcher(ctx context.Context, blockStream <-chan watcher.Block, rabbitQueue chan<- watcher.Block) *Watcher

NewWatcher returns instanciated Watcher

func (*Watcher) WatchWithTimeout

func (w *Watcher) WatchWithTimeout(ctx context.Context, timeout time.Duration) error

WatchWithTimeout is used to receive blocks from Block Stream and send them to Queue

Directories

Path Synopsis
cosmos_sdk

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL