kafka

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: GPL-3.0 Imports: 21 Imported by: 7

Documentation

Overview

Package kafka defines an implementation of Database interface which exports streaming data using Kafka for data analysis.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap

func Wrap(db iface.Database) (iface.Database, error)

Wrap the db with kafka exporter. If the feature flag is not enabled, this service does not wrap the database, but returns the underlying database pointer itself.

Types

type Exporter

type Exporter struct {
	// contains filtered or unexported fields
}

Exporter wraps a database interface and exports certain objects to kafka topics.

func (Exporter) ArchivedPointRoot added in v0.3.2

func (e Exporter) ArchivedPointRoot(ctx context.Context, index types.Slot) [32]byte

ArchivedPointRoot -- passthrough

func (Exporter) AttesterSlashing

func (e Exporter) AttesterSlashing(ctx context.Context, slashingRoot [32]byte) (*eth.AttesterSlashing, error)

AttesterSlashing -- passthrough.

func (Exporter) Backup

func (e Exporter) Backup(ctx context.Context, outputDir string) error

Backup -- passthrough.

func (Exporter) Block

func (e Exporter) Block(ctx context.Context, blockRoot [32]byte) (*eth.SignedBeaconBlock, error)

Block -- passthrough.

func (Exporter) BlockRoots

func (e Exporter) BlockRoots(ctx context.Context, f *filters.QueryFilter) ([][32]byte, error)

BlockRoots -- passthrough.

func (Exporter) BlockRootsBySlot added in v1.1.0

func (e Exporter) BlockRootsBySlot(ctx context.Context, slot types.Slot) (bool, [][32]byte, error)

BlockRootsBySlot -- passthrough.

func (Exporter) Blocks

func (e Exporter) Blocks(ctx context.Context, f *filters.QueryFilter) ([]*eth.SignedBeaconBlock, [][32]byte, error)

Blocks -- passthrough.

func (Exporter) BlocksBySlot added in v1.1.0

func (e Exporter) BlocksBySlot(ctx context.Context, slot types.Slot) (bool, []*eth.SignedBeaconBlock, error)

BlocksBySlot -- passthrough.

func (Exporter) CleanUpDirtyStates added in v1.0.0

func (e Exporter) CleanUpDirtyStates(ctx context.Context, slotsPerArchivedPoint types.Slot) error

CleanUpDirtyStates -- passthrough

func (Exporter) ClearDB

func (e Exporter) ClearDB() error

ClearDB -- passthrough.

func (Exporter) Close

func (e Exporter) Close() error

Close closes kafka producer and underlying db.

func (Exporter) DatabasePath

func (e Exporter) DatabasePath() string

DatabasePath -- passthrough.

func (Exporter) DeleteState

func (e Exporter) DeleteState(ctx context.Context, blockRoot [32]byte) error

DeleteState -- passthrough.

func (Exporter) DeleteStates

func (e Exporter) DeleteStates(ctx context.Context, blockRoots [][32]byte) error

DeleteStates -- passthrough.

func (Exporter) DepositContractAddress

func (e Exporter) DepositContractAddress(ctx context.Context) ([]byte, error)

DepositContractAddress -- passthrough.

func (Exporter) EnsureEmbeddedGenesis added in v1.3.4

func (e Exporter) EnsureEmbeddedGenesis(ctx context.Context) error

EnsureEmbeddedGenesis -- passthrough.

func (Exporter) FinalizedCheckpoint

func (e Exporter) FinalizedCheckpoint(ctx context.Context) (*eth.Checkpoint, error)

FinalizedCheckpoint -- passthrough.

func (Exporter) FinalizedChildBlock added in v1.0.0

func (e Exporter) FinalizedChildBlock(ctx context.Context, blockRoot [32]byte) (*eth.SignedBeaconBlock, error)

FinalizedChildBlock -- passthrough.

func (Exporter) GenesisBlock

func (e Exporter) GenesisBlock(ctx context.Context) (*eth.SignedBeaconBlock, error)

GenesisBlock -- passthrough.

func (Exporter) GenesisState

func (e Exporter) GenesisState(ctx context.Context) (iface.BeaconState, error)

GenesisState -- passthrough.

func (Exporter) HasArchivedPoint added in v0.3.2

func (e Exporter) HasArchivedPoint(ctx context.Context, index types.Slot) bool

HasArchivedPoint -- passthrough

func (Exporter) HasAttesterSlashing

func (e Exporter) HasAttesterSlashing(ctx context.Context, slashingRoot [32]byte) bool

HasAttesterSlashing -- passthrough.

func (Exporter) HasBlock

func (e Exporter) HasBlock(ctx context.Context, blockRoot [32]byte) bool

HasBlock -- passthrough.

func (Exporter) HasProposerSlashing

func (e Exporter) HasProposerSlashing(ctx context.Context, slashingRoot [32]byte) bool

HasProposerSlashing -- passthrough.

func (Exporter) HasState added in v0.3.2

func (e Exporter) HasState(ctx context.Context, blockRoot [32]byte) bool

HasState -- passthrough.

func (Exporter) HasStateSummary added in v0.3.2

func (e Exporter) HasStateSummary(ctx context.Context, blockRoot [32]byte) bool

HasStateSummary -- passthrough.

func (Exporter) HasVoluntaryExit

func (e Exporter) HasVoluntaryExit(ctx context.Context, exitRoot [32]byte) bool

HasVoluntaryExit -- passthrough.

func (Exporter) HeadBlock

func (e Exporter) HeadBlock(ctx context.Context) (*eth.SignedBeaconBlock, error)

HeadBlock -- passthrough.

func (Exporter) HighestSlotBlocksBelow added in v0.3.9

func (e Exporter) HighestSlotBlocksBelow(ctx context.Context, slot types.Slot) ([]*eth.SignedBeaconBlock, error)

HighestSlotBlocksBelow -- passthrough

func (Exporter) HighestSlotStatesBelow added in v0.3.9

func (e Exporter) HighestSlotStatesBelow(ctx context.Context, slot types.Slot) ([]iface.ReadOnlyBeaconState, error)

HighestSlotStatesBelow -- passthrough

func (Exporter) IsFinalizedBlock

func (e Exporter) IsFinalizedBlock(ctx context.Context, blockRoot [32]byte) bool

IsFinalizedBlock -- passthrough.

func (Exporter) JustifiedCheckpoint

func (e Exporter) JustifiedCheckpoint(ctx context.Context) (*eth.Checkpoint, error)

JustifiedCheckpoint -- passthrough.

func (Exporter) LastArchivedRoot added in v1.0.0

func (e Exporter) LastArchivedRoot(ctx context.Context) [32]byte

LastArchivedRoot -- passthrough

func (Exporter) LastArchivedSlot added in v1.0.0

func (e Exporter) LastArchivedSlot(ctx context.Context) (types.Slot, error)

LastArchivedSlot -- passthrough

func (Exporter) LoadGenesis added in v1.3.4

func (e Exporter) LoadGenesis(ctx context.Context, r io.Reader) error

LoadGenesisFromFile -- passthrough

func (Exporter) PowchainData

func (e Exporter) PowchainData(ctx context.Context) (*db.ETH1ChainData, error)

PowchainData -- passthrough

func (Exporter) ProposerSlashing

func (e Exporter) ProposerSlashing(ctx context.Context, slashingRoot [32]byte) (*eth.ProposerSlashing, error)

ProposerSlashing -- passthrough.

func (Exporter) RunMigrations added in v1.0.0

func (e Exporter) RunMigrations(ctx context.Context) error

RunMigrations -- passthrough

func (Exporter) SaveAttesterSlashing

func (e Exporter) SaveAttesterSlashing(ctx context.Context, slashing *eth.AttesterSlashing) error

SaveAttesterSlashing -- passthrough.

func (Exporter) SaveBlock

func (e Exporter) SaveBlock(ctx context.Context, block *eth.SignedBeaconBlock) error

SaveBlock publishes to the kafka topic for beacon blocks.

func (Exporter) SaveBlocks

func (e Exporter) SaveBlocks(ctx context.Context, blocks []*eth.SignedBeaconBlock) error

SaveBlocks publishes to the kafka topic for beacon blocks.

func (Exporter) SaveDepositContractAddress

func (e Exporter) SaveDepositContractAddress(ctx context.Context, addr common.Address) error

SaveDepositContractAddress -- passthrough.

func (Exporter) SaveFinalizedCheckpoint

func (e Exporter) SaveFinalizedCheckpoint(ctx context.Context, checkpoint *eth.Checkpoint) error

SaveFinalizedCheckpoint -- passthrough.

func (Exporter) SaveGenesisBlockRoot

func (e Exporter) SaveGenesisBlockRoot(ctx context.Context, blockRoot [32]byte) error

SaveGenesisBlockRoot -- passthrough.

func (Exporter) SaveGenesisData added in v1.3.4

func (e Exporter) SaveGenesisData(ctx context.Context, state iface.BeaconState) error

SaveGenesisData -- passthrough

func (Exporter) SaveHeadBlockRoot

func (e Exporter) SaveHeadBlockRoot(ctx context.Context, blockRoot [32]byte) error

SaveHeadBlockRoot -- passthrough.

func (Exporter) SaveJustifiedCheckpoint

func (e Exporter) SaveJustifiedCheckpoint(ctx context.Context, checkpoint *eth.Checkpoint) error

SaveJustifiedCheckpoint -- passthrough.

func (Exporter) SavePowchainData

func (e Exporter) SavePowchainData(ctx context.Context, data *db.ETH1ChainData) error

SavePowchainData -- passthrough

func (Exporter) SaveProposerSlashing

func (e Exporter) SaveProposerSlashing(ctx context.Context, slashing *eth.ProposerSlashing) error

SaveProposerSlashing -- passthrough.

func (Exporter) SaveState

func (e Exporter) SaveState(ctx context.Context, st iface.ReadOnlyBeaconState, blockRoot [32]byte) error

SaveState -- passthrough.

func (Exporter) SaveStateSummaries added in v0.3.9

func (e Exporter) SaveStateSummaries(ctx context.Context, summaries []*pb.StateSummary) error

SaveStateSummaries -- passthrough.

func (Exporter) SaveStateSummary added in v0.3.2

func (e Exporter) SaveStateSummary(ctx context.Context, summary *pb.StateSummary) error

SaveStateSummary -- passthrough.

func (Exporter) SaveStates added in v0.3.2

func (e Exporter) SaveStates(ctx context.Context, states []iface.ReadOnlyBeaconState, blockRoots [][32]byte) error

SaveStates -- passthrough.

func (Exporter) SaveVoluntaryExit

func (e Exporter) SaveVoluntaryExit(ctx context.Context, exit *eth.VoluntaryExit) error

SaveVoluntaryExit -- passthrough.

func (Exporter) State

func (e Exporter) State(ctx context.Context, blockRoot [32]byte) (iface.BeaconState, error)

State -- passthrough.

func (Exporter) StateSummary added in v0.3.2

func (e Exporter) StateSummary(ctx context.Context, blockRoot [32]byte) (*pb.StateSummary, error)

StateSummary -- passthrough.

func (Exporter) VoluntaryExit

func (e Exporter) VoluntaryExit(ctx context.Context, exitRoot [32]byte) (*eth.VoluntaryExit, error)

VoluntaryExit -- passthrough.

Jump to

Keyboard shortcuts

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