app

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 20 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tier1App

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

func NewTier1

func NewTier1(logger *zap.Logger, config *Tier1Config, modules *Tier1Modules) *Tier1App

func (*Tier1App) HealthCheck

func (a *Tier1App) HealthCheck(ctx context.Context) (bool, interface{}, error)

func (*Tier1App) IsReady

func (a *Tier1App) IsReady(ctx context.Context) bool

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

func (*Tier1App) Run

func (a *Tier1App) Run() error

type Tier1Config

type Tier1Config struct {
	MeteringConfig string

	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

	StateStoreURL        string
	StateStoreDefaultTag string
	BlockType            string
	StateBundleSize      uint64

	MaxSubrequests       uint64
	SubrequestsEndpoint  string
	SubrequestsInsecure  bool
	SubrequestsPlaintext bool

	WASMExtensions wasm.WASMExtensioner

	Tracing bool
}

func (*Tier1Config) Validate

func (config *Tier1Config) Validate() error

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

type Tier1Modules added in v1.1.9

type Tier1Modules struct {
	// Required dependencies
	Authenticator         dauth.Authenticator
	HeadTimeDriftMetric   *dmetrics.HeadTimeDrift
	HeadBlockNumberMetric *dmetrics.HeadBlockNum
	CheckPendingShutDown  func() bool
}

type Tier2App

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

func NewTier2

func NewTier2(logger *zap.Logger, config *Tier2Config, modules *Tier2Modules) *Tier2App

func (*Tier2App) HealthCheck

func (a *Tier2App) HealthCheck(ctx context.Context) (bool, interface{}, error)

func (*Tier2App) IsReady

func (a *Tier2App) IsReady(ctx context.Context) bool

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

func (*Tier2App) Run

func (a *Tier2App) Run() error

type Tier2Config

type Tier2Config struct {
	GRPCListenAddr      string // gRPC address where this app will listen to
	ServiceDiscoveryURL *url.URL

	PipelineOptions []pipeline.Option

	MaximumConcurrentRequests uint64
	WASMExtensions            wasm.WASMExtensioner

	Tracing bool
}

func (*Tier2Config) Validate

func (config *Tier2Config) Validate() error

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

type Tier2Modules added in v1.3.2

type Tier2Modules struct {
	CheckPendingShutDown func() bool
}

Jump to

Keyboard shortcuts

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