indexer

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

README

Overview

This directory contains structs and functions for sending data from the V4 application to the Indexer.

The base package contains definitions of Indexer specific command-line flags which are added to the start command of the V4 application.

events

The events package contains definitions of on-chain event structs the V4 application emits to the Indexer along with helper functions to instantiate instances of the events.

msgsender

The msgsender package contains structs used to send both off-chain and on-chain data to the Indexer. Currently, all data is sent to the Indexer via Kafka.

off_chain_updates

The off_chain_updates package contains definitions of off-chain update structs the V4 application emits to the Indexer.

Documentation

Index

Constants

View Source
const (
	FlagKafkaConnStr         = "indexer-kafka-conn-str"
	FlagKafkaMaxRetry        = "indexer-kafka-max-retry"
	FlagSendOffchainData     = "indexer-send-offchain-data"
	MsgSenderInstanceForTest = "msgsender-instance-for-test"
)

List of CLI flags

View Source
const (
	DefaultMaxRetries = 3
)

List of default values

Variables

This section is empty.

Functions

func AddIndexerFlagsToCmd

func AddIndexerFlagsToCmd(cmd *cobra.Command)

AddIndexerFlagsToCmd adds the required flags to instantiate a connection to Kafka during App initialization to a command. These flags should be applied to the `start` command of the V4 Cosmos application. E.g. `dydxprotocold start --indexer-kafka-conn-str kafka:9092

Types

type IndexerFlags

type IndexerFlags struct {
	KafkaAddrs       []string
	MaxRetries       int
	SendOffchainData bool
}

func GetIndexerFlagValuesFromOptions

func GetIndexerFlagValuesFromOptions(
	appOpts servertypes.AppOptions,
) IndexerFlags

GetIndexerFlagValuesFromOptions gets values for connecting to Kafka from the `AppOptions` struct which contains values from the Indexer command-line flags.

Directories

Path Synopsis
protocol
v1

Jump to

Keyboard shortcuts

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