Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AppName = "near-indexer" AppVersion = "0.18.7" GitCommit = "-" GoVersion = "-" )
Functions ¶
Types ¶
type Config ¶
type Config struct { AppEnv string `json:"app_env" envconfig:"APP_ENV" default:"development"` Network string `json:"network_id" envconfig:"NETWORK_ID" default:"near"` ChainID string `json:"chain_id" envconfig:"CHAIN_ID" default:"mainnet"` RPCEndpoints string `json:"rpc_endpoints" envconfig:"NEAR_RPC_ENDPOINTS" default:"http://0.0.0.0:3030"` RPCApiKey string `json:"rpc_api_key" envconfig:"NEAR_RPC_API_KEY" default:""` RPCTimeout string `json:"rpc_timeout" envconfig:"NEAR_RPC_TIMEOUT" default:"75s"` ServerAddr string `json:"server_addr" envconfig:"SERVER_ADDR" default:"0.0.0.0"` ServerPort int `json:"server_port" envconfig:"SERVER_PORT" default:"8081"` StartHeight uint64 `json:"start_height" envconfig:"START_HEIGHT"` SyncInterval string `json:"sync_interval" envconfig:"SYNC_INTERVAL" default:"500ms"` SyncBatchSize int `json:"sync_batch_size" envconfig:"SYNC_BATCH_SIZE" default:"10"` CleanupInterval string `json:"cleanup_interval" envconfig:"CLEANUP_INTERVAL" default:"10m"` CleanupThreshold int `json:"cleanup_threshold" envconfig:"CLEANUP_THRESHOLD" default:"3600"` DatabaseURL string `json:"database_url" envconfig:"DATABASE_URL"` DumpDir string `json:"dump_dir" envconfig:"DUMP_DIR"` Debug bool `json:"debug" envconfig:"DEBUG"` LogLevel string `json:"log_level" envconfig:"LOG_LEVEL" default:"info"` DatastoreGRPCAddr string `json:"datastore_grpc_addr" envconfig:"DATASTORE_GRPC_ADDR" default:""` DatastoreGRPCMsgSize int `json:"datastore_grpc_msg_size" envconfig:"DATASTORE_GRPC_MSG_SIZE" default:"104857600"` // 100*1024*1024 RewardsHTTPStoreAddress string `json:"rewards_http_store_address" envconfig:"REWARDS_HTTP_STORE_ADDRESS" default:""` // delegation calls RetryCountDlg int `json:"retry_count_delegation_calls" envconfig:"RETRY_COUNT_DELEGATION_CALLS" default:"4"` ConcurrencyLevel int `json:"concurrency_level" envconfig:"CONCURRENCY_LEVEL" default:"2"` // MetricsServer IndexerMetricAddr string `json:"indexer_metric_addr" envconfig:"INDEXER_METRIC_ADDR" default:"0.0.0.0:8080"` // contains filtered or unexported fields }
Config holds the configration data
func (*Config) CleanupDuration ¶
CleanupDuration returns the parsed duration for the cleanup pipeline
func (*Config) IsDevelopment ¶
IsDevelopment returns true if app is in dev mode
func (*Config) IsProduction ¶
IsProduction returns true if app is in production mode
func (*Config) ListenAddr ¶
ListenAddr returns a full listen address and port
func (*Config) RPCClientTimeout ¶ added in v0.3.0
RPCClientTimeout returns the timeout value for RPC calls
func (*Config) SyncDuration ¶
SyncDuration returns the parsed duration for the sync pipeline
type OutputSplitter ¶ added in v0.18.0
type OutputSplitter struct{}
Click to show internal directories.
Click to hide internal directories.