bootstrap

package
v1.3.24 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MIGRATION_TABLE_NAME    = "schema_migrations"
	MIGRATION_GITHUB_TARGET = "github://%s:%s@WilliamXieCrypto/chain-indexing/migrations%s"
)
View Source
const DEFAULT_MAX_RETRY_INTERVAL = 15 * time.Minute
View Source
const DEFAULT_MAX_RETRY_TIME = MAX_RETRY_TIME_ALWAYS_RETRY
View Source
const DEFAULT_POLLING_INTERVAL = 5 * time.Second
View Source
const INFO_DEFAULT_POLLING_INTERVAL = 5 * time.Second

TODO: Move InfoManager to CronJob

View Source
const MAX_RETRY_TIME_ALWAYS_RETRY = 0

Variables

This section is empty.

Functions

func NewApp

func NewApp(logger applogger.Logger, config *config.Config) *app

func SetupRDbConn

func SetupRDbConn(config *config.Config, logger applogger.Logger) (rdb.Conn, error)

Types

type HTTPAPIServer

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

func NewHTTPAPIServer

func NewHTTPAPIServer(logger applogger.Logger, config *config.Config) *HTTPAPIServer

func (*HTTPAPIServer) RegisterRoutes

func (server *HTTPAPIServer) RegisterRoutes(registry RouteRegistry)

func (*HTTPAPIServer) Run

func (server *HTTPAPIServer) Run() error

type IndexService

type IndexService struct {
	GithubAPIUser  string
	GithubAPIToken string
	// contains filtered or unexported fields
}

func NewIndexService

func NewIndexService(
	logger applogger.Logger,
	rdbConn rdb.Conn,
	config *config.Config,
	projections []projection_entity.Projection,
	cronJobs []projection_entity.CronJob,
) *IndexService

NewIndexService creates a new server instance for polling and indexing

func (*IndexService) Run

func (service *IndexService) Run() error

func (*IndexService) RunEventStoreMode

func (service *IndexService) RunEventStoreMode() error

func (*IndexService) RunTendermintDirectMode

func (service *IndexService) RunTendermintDirectMode() error

type InfoManager

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

func NewInfoManager

func NewInfoManager(
	logger applogger.Logger,
	rdbConn rdb.Conn,
	tendermintRPCUrl string,
	insecureTendermintClient bool,
	strictGenesisParsing bool,
) *InfoManager

func (*InfoManager) Run

func (manager *InfoManager) Run()

type RouteRegistry

type RouteRegistry interface {
	Register(*httpapi.Server, string)
}

type SyncManager

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

func NewSyncManager

func NewSyncManager(
	params SyncManagerParams,
	pm *utils.CosmosParserManager,
	eventHandler eventhandler_interface.Handler,
) *SyncManager

NewSyncManager creates a new feed with polling for latest block starts at a specific height

func (*SyncManager) Run

func (manager *SyncManager) Run() error

Run starts the polling service for blocks

func (*SyncManager) SyncBlocks

func (manager *SyncManager) SyncBlocks(latestHeight int64, isRetry bool) error

SyncBlocks makes request to tendermint, create and dispatch notifications

type SyncManagerConfig

type SyncManagerConfig struct {
	WindowSize               int
	TendermintRPCUrl         string
	CosmosAppHTTPRPCURL      string
	InsecureTendermintClient bool
	InsecureCosmosAppClient  bool
	StrictGenesisParsing     bool

	AccountAddressPrefix string
	StakingDenom         string
}

type SyncManagerParams

type SyncManagerParams struct {
	Logger    applogger.Logger
	RDbConn   rdb.Conn
	TxDecoder *utils.TxDecoder

	Config SyncManagerConfig
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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