indexer

package
v27.0.0-...-a0c3b63 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	IsEnabled:                false,
	MaxPublishDelay:          4,
	GCPProjectId:             "",
	BlockTopicId:             "",
	TransactionTopicId:       "",
	PoolTopicId:              "",
	TokenSupplyTopicId:       "",
	TokenSupplyOffsetTopicId: "",
}

DefaultConfig defines the default config for the indexer client.

Functions

func NewIndexerPublisher

func NewIndexerPublisher(pubsubClient service.PubSubClient) domain.Publisher

NewIndexerPublisher creates a new IndexerPublisher with the given PubSubClient

Types

type Config

type Config struct {
	IsEnabled                bool   `mapstructure:"enabled"`
	MaxPublishDelay          int    `mapstructure:"max-publish-delay"`
	GCPProjectId             string `mapstructure:"gcp-project-id"`
	BlockTopicId             string `mapstructure:"block-topic-id"`
	TransactionTopicId       string `mapstructure:"transaction-topic-id"`
	PoolTopicId              string `mapstructure:"pool-topic-id"`
	TokenSupplyTopicId       string `mapstructure:"token-supply-topic-id"`
	TokenSupplyOffsetTopicId string `mapstructure:"token-supply-offset-topic-id"`
	PairTopicId              string `mapstructure:"pair-offset-topic-id"`
}

Config defines the config for the indexer.

func NewConfigFromOptions

func NewConfigFromOptions(opts servertypes.AppOptions) Config

NewConfigFromOptions returns a new indexer config from the given options.

func (Config) Initialize

func (c Config) Initialize() domain.Publisher

Initialize initializes the indexer by creating a new PubSubClient and returning a new IndexerIngester.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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