sqs

package
v23.0.11 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

README

Sidecar Query Server Ingester

This is an implementation of the sidecar query server (SQS) ingester.

Please find the sidecar query server here

The use case for this is performing certain data and computationally intensive tasks outside of the chain node or the clients. For example, routing falls under this category because it requires all pool data for performing the complex routing algorithm.

SQS is meant to offload the query load from the chain node to a separate server. Primarily, we use it for swap routing.

Integrator Guide

Follow this link to find a guide on how to integrate with the sidecar query server.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{

	IsEnabled: false,

	StorageHost: "localhost",
	StoragePort: "6379",
}

DefaultConfig defines the default config for the sidecar query server.

Functions

func NewSidecarQueryServerIngester

func NewSidecarQueryServerIngester(poolsIngester domain.PoolIngester, chainInfoIngester chaininforedisrepo.ChainInfoRepository, txManager repository.TxManager, keepers domain.SQSIngestKeepers) domain.Ingester

NewSidecarQueryServerIngester creates a new sidecar query server ingester. poolsRepository is the storage for pools. gammKeeper is the keeper for Gamm pools.

Types

type Config

type Config struct {
	// IsEnabled defines if the sidecar query server is enabled.
	IsEnabled bool `mapstructure:"enabled"`

	// Storage defines the storage host and port.
	StorageHost string `mapstructure:"db-host"`
	StoragePort string `mapstructure:"db-port"`
}

Config defines the config for the sidecar query server.

func NewConfigFromOptions

func NewConfigFromOptions(opts servertypes.AppOptions) Config

NewConfigFromOptions returns a new sidecar query server config from the given options.

func (Config) Initialize

func (c Config) Initialize(appCodec codec.Codec, keepers domain.SQSIngestKeepers) (domain.Ingester, error)

Initialize initializes the sidecar query server and returns the ingester.

Directories

Path Synopsis
pools

Jump to

Keyboard shortcuts

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