kafka

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2020 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

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) ArchivedActiveValidatorChanges

func (e Exporter) ArchivedActiveValidatorChanges(ctx context.Context, epoch uint64) (*ethereum_beacon_p2p_v1.ArchivedActiveSetChanges, error)

ArchivedActiveValidatorChanges -- passthrough.

func (Exporter) ArchivedBalances

func (e Exporter) ArchivedBalances(ctx context.Context, epoch uint64) ([]uint64, error)

ArchivedBalances -- passthrough.

func (Exporter) ArchivedCommitteeInfo

func (e Exporter) ArchivedCommitteeInfo(ctx context.Context, epoch uint64) (*ethereum_beacon_p2p_v1.ArchivedCommitteeInfo, error)

ArchivedCommitteeInfo -- passthrough.

func (Exporter) ArchivedPointRoot added in v0.3.2

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

ArchivedPointRoot -- passthrough

func (Exporter) ArchivedValidatorParticipation

func (e Exporter) ArchivedValidatorParticipation(ctx context.Context, epoch uint64) (*eth.ValidatorParticipation, error)

ArchivedValidatorParticipation -- passthrough.

func (Exporter) Attestations

func (e Exporter) Attestations(ctx context.Context, f *filters.QueryFilter) ([]*eth.Attestation, error)

Attestations -- passthrough.

func (Exporter) AttestationsByDataRoot

func (e Exporter) AttestationsByDataRoot(ctx context.Context, attDataRoot [32]byte) ([]*eth.Attestation, error)

AttestationsByDataRoot -- 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) DeleteAttestation

func (e Exporter) DeleteAttestation(ctx context.Context, attDataRoot [32]byte) error

DeleteAttestation -- passthrough.

func (Exporter) DeleteAttestations

func (e Exporter) DeleteAttestations(ctx context.Context, attDataRoots [][32]byte) error

DeleteAttestations -- passthrough.

func (Exporter) DeleteAttesterSlashing

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

DeleteAttesterSlashing -- passthrough.

func (Exporter) DeleteBlock

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

DeleteBlock -- passthrough.

func (Exporter) DeleteBlocks

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

DeleteBlocks -- passthrough.

func (Exporter) DeleteProposerSlashing

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

DeleteProposerSlashing -- 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) DeleteValidatorIndex

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

DeleteValidatorIndex -- passthrough.

func (Exporter) DeleteVoluntaryExit

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

DeleteVoluntaryExit -- 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) HasAttestation

func (e Exporter) HasAttestation(ctx context.Context, attDataRoot [32]byte) bool

HasAttestation -- 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) HasValidatorIndex

func (e Exporter) HasValidatorIndex(ctx context.Context, publicKey []byte) bool

HasValidatorIndex -- 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) HighestSlotBlocks added in v0.3.9

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

HighestSlotBlocks -- 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) HighestSlotStates added in v0.3.9

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

HighestSlotStates -- 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) 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) LastArchivedIndexRoot added in v0.3.5

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

LastArchivedIndexRoot -- 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) SaveArchivedActiveValidatorChanges

func (e Exporter) SaveArchivedActiveValidatorChanges(ctx context.Context, epoch uint64, changes *ethereum_beacon_p2p_v1.ArchivedActiveSetChanges) error

SaveArchivedActiveValidatorChanges -- passthrough.

func (Exporter) SaveArchivedBalances

func (e Exporter) SaveArchivedBalances(ctx context.Context, epoch uint64, balances []uint64) error

SaveArchivedBalances -- passthrough.

func (Exporter) SaveArchivedCommitteeInfo

func (e Exporter) SaveArchivedCommitteeInfo(ctx context.Context, epoch uint64, info *ethereum_beacon_p2p_v1.ArchivedCommitteeInfo) error

SaveArchivedCommitteeInfo -- passthrough.

func (Exporter) SaveArchivedPointRoot added in v0.3.2

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

SaveArchivedPointRoot -- passthrough

func (Exporter) SaveArchivedValidatorParticipation

func (e Exporter) SaveArchivedValidatorParticipation(ctx context.Context, epoch uint64, part *eth.ValidatorParticipation) error

SaveArchivedValidatorParticipation -- passthrough.

func (Exporter) SaveAttestation

func (e Exporter) SaveAttestation(ctx context.Context, att *eth.Attestation) error

SaveAttestation publishes to the kafka topic for attestations.

func (Exporter) SaveAttestations

func (e Exporter) SaveAttestations(ctx context.Context, atts []*eth.Attestation) error

SaveAttestations publishes to the kafka topic for beacon attestations.

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) SaveLastArchivedIndex added in v0.3.5

func (e Exporter) SaveLastArchivedIndex(ctx context.Context, index uint64) error

SaveLastArchivedIndex -- 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) SaveValidatorIndex

func (e Exporter) SaveValidatorIndex(ctx context.Context, publicKey []byte, validatorIdx uint64) error

SaveValidatorIndex -- passthrough.

func (Exporter) SaveValidatorIndices added in v0.3.2

func (e Exporter) SaveValidatorIndices(ctx context.Context, publicKeys [][48]byte, validatorIndices []uint64) error

SaveValidatorIndices -- 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) ValidatorIndex

func (e Exporter) ValidatorIndex(ctx context.Context, publicKey []byte) (uint64, bool, error)

ValidatorIndex -- 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