das

package
v0.5.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructModule

func ConstructModule(tp node.Type, cfg *Config) fx.Option

func NewDASer

func NewDASer(
	da share.Availability,
	hsub header.Subscriber,
	store header.Store,
	batching datastore.Batching,
	fraudService fraud.Service,
	options ...das.Option,
) (*das.DASer, error)

func WithMetrics

func WithMetrics(d *das.DASer) error

WithMetrics is a utility function that is expected to be "invoked" by the fx lifecycle.

Types

type API

type API struct {
	SamplingStats func(ctx context.Context) (das.SamplingStats, error)
}

API is a wrapper around Module for the RPC. TODO(@distractedm1nd): These structs need to be autogenerated.

type Config

type Config das.Parameters

Config contains configuration parameters for the DASer (or DASing process)

func DefaultConfig

func DefaultConfig() Config

TODO(@derrandz): parameters needs performance testing on real network to define optimal values DefaultConfig provide the optimal default configuration per node type. For the moment, there is only one default configuration for all node types but this function will provide more once #1261 is addressed.

TODO(@derrandz): Address #1261

func (*Config) Validate

func (cfg *Config) Validate() error

Validate performs basic validation of the config. Upon encountering an invalid value, Validate returns an error of type: ErrMisConfig

type Module

type Module interface {
	// SamplingStats returns the current statistics over the DA sampling process.
	SamplingStats(ctx context.Context) (das.SamplingStats, error)
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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