data

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 8 Imported by: 8

Documentation

Index

Constants

View Source
const (
	// ConduitTimeFormat is the time format used by conduit's logger.
	// time.RFC3339Nano = "2006-01-02T15:04:05.999999999Z07:00"
	ConduitTimeFormat = time.RFC3339Nano
)

Variables

View Source
var DefaultConfigBaseName = "conduit"

DefaultConfigBaseName is the default conduit configuration filename without the extension.

View Source
var DefaultConfigName = fmt.Sprintf("%s.yml", DefaultConfigBaseName)

DefaultConfigName is the default conduit configuration filename.

View Source
var DefaultLogLevel = log.InfoLevel

DefaultLogLevel is the default conduit log level if none is provided.

View Source
var DefaultMetricsPrefix = "conduit"

DefaultMetricsPrefix is the default prometheus subsystem if no Prefix option is provided.

Functions

This section is empty.

Types

type API added in v1.4.0

type API struct {
	Address string `yaml:"addr"`
}

API defines parameters for the Conduit API server.

type Args added in v1.2.0

type Args struct {
	ConduitDataDir    string `yaml:"data-dir"`
	NextRoundOverride uint64 `yaml:"next-round-override"`
}

Args configuration for conduit running.

type BlockData

type BlockData struct {

	// BlockHeader is the immutable header from the block
	BlockHeader sdk.BlockHeader `json:"block,omitempty"`

	// Payset is the set of data the block is carrying--can be modified as it is processed
	Payset []sdk.SignedTxnInBlock `json:"payset,omitempty"`

	// Delta contains a list of account changes resulting from the block. Processor plugins may have modify this data.
	Delta *sdk.LedgerStateDelta `json:"delta,omitempty"`

	// Certificate contains voting data that certifies the block. The certificate is non deterministic, a node stops collecting votes once the voting threshold is reached.
	Certificate *map[string]interface{} `json:"cert,omitempty"`
}

BlockData is provided to the Exporter on each round.

func (BlockData) Empty

func (blkData BlockData) Empty() bool

Empty returns whether the Block contains Txns. Assumes the Block is never nil

func (BlockData) Round

func (blkData BlockData) Round() uint64

Round returns the round to which the BlockData corresponds

type Config added in v1.2.0

type Config struct {
	// ConduitArgs are the program inputs. Should not be serialized for config.
	ConduitArgs *Args `yaml:"-"`

	CPUProfile  string `yaml:"cpu-profile"`
	PIDFilePath string `yaml:"pid-filepath"`
	HideBanner  bool   `yaml:"hide-banner"`

	LogFile  string `yaml:"log-file"`
	LogLevel string `yaml:"log-level"`
	// Store a local copy to access parent variables
	Importer   NameConfigPair   `yaml:"importer"`
	Processors []NameConfigPair `yaml:"processors"`
	Exporter   NameConfigPair   `yaml:"exporter"`
	Metrics    Metrics          `yaml:"metrics"`
	API        API              `yaml:"api"`
	// RetryCount is the number of retries to perform for an error in the pipeline
	RetryCount uint64 `yaml:"retry-count"`
	// RetryDelay is a duration amount interpreted from a string
	RetryDelay time.Duration `yaml:"retry-delay"`

	Telemetry Telemetry `yaml:"telemetry"`
}

Config stores configuration specific to the conduit pipeline

func MakePipelineConfig added in v1.2.0

func MakePipelineConfig(args *Args) (*Config, error)

MakePipelineConfig creates a pipeline configuration

func (*Config) Valid added in v1.2.0

func (cfg *Config) Valid() error

Valid validates pipeline config

type InitProvider

type InitProvider interface {
	GetGenesis() *sdk.Genesis
	SetGenesis(*sdk.Genesis)
	NextDBRound() sdk.Round
	GetTelemetryClient() telemetry.Client
}

InitProvider is the interface that can be used when initializing to get common algod related variables

type Metrics added in v1.2.0

type Metrics struct {
	Mode   string `yaml:"mode"`
	Addr   string `yaml:"addr"`
	Prefix string `yaml:"prefix"`
}

Metrics configs for turning on Prometheus endpoint /metrics

type NameConfigPair added in v1.2.0

type NameConfigPair struct {
	Name   string                 `yaml:"name"`
	Config map[string]interface{} `yaml:"config"`
}

NameConfigPair is a generic structure used across plugin configuration ser/de

type RoundProvider

type RoundProvider interface {
	Round() uint64
	Empty() bool
}

RoundProvider is the interface which all data types sent to Exporters should implement

type Telemetry added in v1.2.0

type Telemetry struct {
	Enabled  bool   `yaml:"enabled"`
	URI      string `yaml:"uri"`
	Index    string `yaml:"index"`
	UserName string `yaml:"username"`
	Password string `yaml:"password"`
}

Telemetry configs for sending Telemetry to OpenSearch

Jump to

Keyboard shortcuts

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