firehose

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

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, tracer logging.Tracer, config *Config, modules *Modules) *App

func (*App) IsReady

func (a *App) IsReady(ctx context.Context) 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 {
	MergedBlocksStoreURL    string
	OneBlocksStoreURL       string
	ForkedBlocksStoreURL    string
	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
	ServiceDiscoveryURL     *url.URL
	ServerOptions           []server.Option `json:"-"`
}

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
	HeadTimeDriftMetric      *dmetrics.HeadTimeDrift
	HeadBlockNumberMetric    *dmetrics.HeadBlockNum
	TransformRegistry        *transform.Registry
	RegisterServiceExtension RegisterServiceExtensionFunc
	CheckPendingShutdown     func() bool
}

type RegisterServiceExtensionFunc

type RegisterServiceExtensionFunc func(server dgrpcserver.Server,
	mergedBlocksStore dstore.Store,
	forkedBlocksStore dstore.Store,
	forkableHub *hub.ForkableHub,
	logger *zap.Logger)

Jump to

Keyboard shortcuts

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