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 App

type App struct {
	*bandapp.BandApp
	// contains filtered or unexported fields
}

    App extends the standard Band Cosmos-SDK application with Kafka emitter functionality to act as an event producer for all events in the blockchains.

    func NewBandAppWithEmitter

    func NewBandAppWithEmitter(
    	kafkaURI string, logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool,
    	invCheckPeriod uint, skipUpgradeHeights map[int64]bool, home string,
    	disableFeelessReports bool, enableFastSync bool, baseAppOptions ...func(*bam.BaseApp),
    ) *App

      NewBandAppWithEmitter creates a new App instance.

      func (*App) AddAccountsInBlock

      func (app *App) AddAccountsInBlock(accs ...sdk.AccAddress)

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

        func (*App) AddAccountsInTx

        func (app *App) AddAccountsInTx(accs ...sdk.AccAddress)

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

          func (*App) BeginBlock

          func (app *App) BeginBlock(req abci.RequestBeginBlock) abci.ResponseBeginBlock

            BeginBlock calls into the underlying BeginBlock and emits relevant events to Kafka.

            func (*App) Commit

            func (app *App) Commit() (res abci.ResponseCommit)

              Commit makes sure all Kafka messages are broadcasted and then calls into the underlying Commit.

              func (*App) DeliverTx

              func (app *App) DeliverTx(req abci.RequestDeliverTx) abci.ResponseDeliverTx

                DeliverTx calls into the underlying DeliverTx and emits relevant events to Kafka.

                func (*App) EndBlock

                func (app *App) EndBlock(req abci.RequestEndBlock) abci.ResponseEndBlock

                  EndBlock calls into the underlying EndBlock and emits relevant events to Kafka.

                  func (*App) FlushMessages

                  func (app *App) FlushMessages()

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

                    func (*App) InitChain

                    func (app *App) InitChain(req abci.RequestInitChain) abci.ResponseInitChain

                      InitChain calls into the underlying InitChain and emits relevant events to Kafka.

                      func (*App) Write

                      func (app *App) Write(key string, val JsDict)

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

                        type EvMap

                        type EvMap map[string][]string

                          EvMap is a type alias for SDK events mapping from Attr.Key to the list of values.

                          type JsDict

                          type JsDict map[string]interface{}

                            JsDict is a type alias for JSON dictionary.

                            type Message

                            type Message struct {
                            	Key   string
                            	Value JsDict
                            }

                              Message is a simple wrapper data type for each message published to Kafka.