kafka

package
v1.0.0-alpha.25 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: GPL-3.0 Imports: 19 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 uint64) [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) 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) Blocks

Blocks -- 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) FinalizedCheckpoint

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

FinalizedCheckpoint -- passthrough.

func (Exporter) GenesisBlock

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

GenesisBlock -- passthrough.

func (Exporter) GenesisState

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

GenesisState -- passthrough.

func (Exporter) HasArchivedPoint added in v0.3.2

func (e Exporter) HasArchivedPoint(ctx context.Context, index uint64) 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) HeadState

func (e Exporter) HeadState(ctx context.Context) (*state.BeaconState, error)

HeadState -- passthrough.

func (Exporter) HighestSlotBlocksBelow added in v0.3.9

func (e Exporter) HighestSlotBlocksBelow(ctx context.Context, slot uint64) ([]*ethpb.SignedBeaconBlock, error)

HighestSlotBlocksBelow -- passthrough

func (Exporter) HighestSlotStatesBelow added in v0.3.9

func (e Exporter) HighestSlotStatesBelow(ctx context.Context, slot uint64) ([]*state.BeaconState, error)

HighestSlotStatesBelow -- passthrough

func (Exporter) HistoricalStatesDeleted

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

HistoricalStatesDeleted -- 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) (uint64, error)

LastArchivedSlot -- 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) 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, state *state.BeaconState, 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 []*state.BeaconState, 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) (*state.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