firehose

package
Version: v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	*shutter.Shutter
	// contains filtered or unexported fields
}

func New

func New(logger *zap.Logger, config *Config, modules *Modules) *App

func (*App) IsReady

func (a *App) IsReady() bool

IsReady return `true` if the apps is ready to accept requests, `false` is returned otherwise.

func (*App) Run

func (a *App) Run() error

type Config

type Config struct {
	BlockStoreURLs          []string      // Blocks store
	BlockStreamAddr         string        // gRPC endpoint to get real-time blocks, can be "" in which live streams is disabled
	GRPCListenAddr          string        // gRPC address where this app will listen to
	GRPCShutdownGracePeriod time.Duration // The duration we allow for gRPC connections to terminate gracefully prior forcing shutdown
}

func (*Config) Validate

func (config *Config) Validate() error

Validate inspects itself to determine if the current config is valid according to Firehose rules.

type Modules

type Modules struct {
	// Required dependencies
	Authenticator             dauth.Authenticator
	BlockTrimmer              blockstreamv2.BlockTrimmer
	FilterPreprocessorFactory firehose.FilterPreprocessorFactory
	HeadTimeDriftMetric       *dmetrics.HeadTimeDrift
	HeadBlockNumberMetric     *dmetrics.HeadBlockNum
	Tracker                   *bstream.Tracker

	// Optional dependencies
	BlockFilter func(blk *bstream.Block) error
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to