emitter

package
v0.7.32 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: GPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EventTypeInactiveProposal = types.EventTypeInactiveProposal
	EventTypeActiveProposal   = types.EventTypeActiveProposal
	StatusInactive            = 6
)
View Source
var (
	EventTypeCompleteUnbonding    = types.EventTypeCompleteUnbonding
	EventTypeCompleteRedelegation = types.EventTypeCompleteRedelegation
)

Functions

This section is empty.

Types

type Hook

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

Hook uses Kafka functionality to act as an event producer for all events in the blockchains.

func NewHook

func NewHook(
	cdc codec.Codec, legecyAmino *codec.LegacyAmino, encodingConfig params.EncodingConfig, accountKeeper authkeeper.AccountKeeper, bankKeeper bankkeeper.Keeper,
	stakingKeeper *stakingkeeper.Keeper, mintKeeper mintkeeper.Keeper, distrKeeper distrkeeper.Keeper, govKeeper govkeeper.Keeper,
	oracleKeeper oraclekeeper.Keeper, kafkaURI string, emitStartState bool,
) *Hook

NewHook creates an emitter hook instance that will be added in Odin App.

func (*Hook) AddAccountsInBlock

func (h *Hook) AddAccountsInBlock(accs ...string)

AddAccountsInBlock adds the given accounts to the list of accounts to update balances end-of-block.

func (*Hook) AddAccountsInTx

func (h *Hook) AddAccountsInTx(accs ...string)

AddAccountsInTx adds the given accounts to the list of accounts to track related account in transaction.

func (*Hook) AfterBeginBlock

func (h *Hook) AfterBeginBlock(ctx sdk.Context, req abci.RequestBeginBlock, res abci.ResponseBeginBlock)

AfterBeginBlock specify actions need to do after begin block period (app.Hook interface).

func (*Hook) AfterDeliverTx

func (h *Hook) AfterDeliverTx(ctx sdk.Context, req abci.RequestDeliverTx, res abci.ResponseDeliverTx)

AfterDeliverTx specify actions need to do after transaction has been processed (app.Hook interface).

func (*Hook) AfterEndBlock

func (h *Hook) AfterEndBlock(ctx sdk.Context, req abci.RequestEndBlock, res abci.ResponseEndBlock)

AfterEndBlock specify actions need to do after end block period (app.Hook interface).

func (*Hook) AfterInitChain

func (h *Hook) AfterInitChain(ctx sdk.Context, req abci.RequestInitChain, res abci.ResponseInitChain)

AfterInitChain specify actions need to do after chain initialization (app.Hook interface).

func (*Hook) ApplyQuery

func (h *Hook) ApplyQuery(req abci.RequestQuery) (res abci.ResponseQuery, stop bool)

ApplyQuery catch the custom query that matches specific paths (app.Hook interface).

func (*Hook) BeforeCommit

func (h *Hook) BeforeCommit()

BeforeCommit specify actions need to do before commit block (app.Hook interface).

func (*Hook) FlushMessages

func (h *Hook) FlushMessages()

FlushMessages publishes all pending messages to Kafka. Blocks until completion.

func (*Hook) Write

func (h *Hook) Write(key string, val common.JsDict)

Write adds the given key-value pair to the list of messages to publish during Commit.

Jump to

Keyboard shortcuts

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