Documentation ¶
Index ¶
- Constants
- func NewApp(logger applogger.Logger, config *Config) *app
- func SetupRDbConn(config *Config, logger applogger.Logger) (rdb.Conn, error)
- type BlockchainConfig
- type CLIConfig
- type Config
- type CosmosAppConfig
- type CosmosVersionEnabledHeightConfig
- type CronJobConfig
- type DatabaseConfig
- type DebugConfig
- type FileConfig
- type GithubAPIConfig
- type HTTPAPIServer
- type HTTPConfig
- type IndexService
- type InfoManager
- type LoggerConfig
- type PostgresConfig
- type ProjectionConfig
- type RouteRegistry
- type SyncConfig
- type SyncManager
- type SyncManagerConfig
- type SyncManagerParams
- type SystemConfig
- type TendermintConfig
Constants ¶
View Source
const ( MIGRATION_TABLE_NAME = "schema_migrations" MIGRATION_GITHUB_TARGET = "github://%s:%s@crypto-com/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
View Source
const SYSTEM_MODE_API_ONLY = "API_ONLY"
View Source
const SYSTEM_MODE_EVENT_STORE = "EVENT_STORE"
View Source
const SYSTEM_MODE_TENDERMINT_DIRECT = "TENDERMINT_DIRECT"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlockchainConfig ¶
type BlockchainConfig struct { BondingDenom string `toml:"bonding_denom"` AccountAddressPrefix string `toml:"account_address_prefix"` AccountPubKeyPrefix string `toml:"account_pubkey_prefix"` ValidatorAddressPrefix string `toml:"validator_address_prefix"` ValidatorPubKeyPrefix string `toml:"validator_pubkey_prefix"` ConNodeAddressPrefix string `toml:"connode_address_prefix"` ConNodePubKeyPrefix string `toml:"connode_pubkey_prefix"` }
type CLIConfig ¶
type CLIConfig struct { LoggerColor *bool LogLevel string DatabaseSSL *bool DatabaseHost string DatabasePort *int32 DatabaseUsername string DatabasePassword string DatabaseName string DatabaseSchema string TendermintHTTPRPCUrl string CosmosHTTPRPCUrl string GithubAPIUsername string GithubAPIToken string }
type CosmosAppConfig ¶
type CosmosVersionEnabledHeightConfig ¶
type CosmosVersionEnabledHeightConfig struct {
V0_42_7 uint64 `toml:"v0_42_7"`
}
type CronJobConfig ¶
type CronJobConfig struct {
Enables []string `toml:"enables"`
}
type DatabaseConfig ¶
type DebugConfig ¶
type FileConfig ¶
type FileConfig struct { Blockchain BlockchainConfig System SystemConfig Sync SyncConfig Tendermint TendermintConfig CosmosApp CosmosAppConfig `toml:"cosmosapp"` HTTP HTTPConfig Debug DebugConfig Database DatabaseConfig Postgres PostgresConfig Logger LoggerConfig Projection ProjectionConfig CronJob CronJobConfig `toml:"cronjob"` CosmosVersionEnabledHeight CosmosVersionEnabledHeightConfig `toml:"cosmos_version_enabled_height"` GithubAPI GithubAPIConfig `toml:"github_api"` }
FileConfig is the struct matches config.toml
type GithubAPIConfig ¶ added in v1.1.0
type HTTPAPIServer ¶
type HTTPAPIServer struct {
// contains filtered or unexported fields
}
func NewHTTPAPIServer ¶
func NewHTTPAPIServer(logger applogger.Logger, config *Config) *HTTPAPIServer
func (*HTTPAPIServer) RegisterRoutes ¶
func (server *HTTPAPIServer) RegisterRoutes(registry RouteRegistry)
func (*HTTPAPIServer) Run ¶
func (server *HTTPAPIServer) Run() error
type HTTPConfig ¶
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, 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 (*InfoManager) Run ¶
func (manager *InfoManager) Run()
type LoggerConfig ¶
type PostgresConfig ¶
type ProjectionConfig ¶
type ProjectionConfig struct {
Enables []string `toml:"enables"`
}
type RouteRegistry ¶
type SyncConfig ¶
type SyncConfig struct {
WindowSize int `toml:"window_size"`
}
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 SyncManagerParams ¶
type SystemConfig ¶
type SystemConfig struct {
Mode string `toml:"mode"`
}
type TendermintConfig ¶
Click to show internal directories.
Click to hide internal directories.