Documentation ¶
Index ¶
Constants ¶
View Source
const ( AppName = "polkadothub-indexer" AppVersion = "0.10.2" GitCommit = "-" GoVersion = "1.14" )
Variables ¶
This section is empty.
Functions ¶
func VersionString ¶
func VersionString() string
Types ¶
type Config ¶
type Config struct { AppEnv string `json:"app_env" envconfig:"APP_ENV" default:"development"` ProxyUrl string `json:"proxy_url" envconfig:"PROXY_URL"` ServerAddr string `json:"server_addr" envconfig:"SERVER_ADDR" default:"0.0.0.0"` ServerPort int64 `json:"server_port" envconfig:"SERVER_PORT" default:"8081"` FirstBlockHeight int64 `json:"first_block_height" envconfig:"FIRST_BLOCK_HEIGHT" default:"1"` IndexWorkerInterval string `json:"index_worker_interval" envconfig:"INDEX_WORKER_INTERVAL" default:"@every 15m"` SummarizeWorkerInterval string `json:"summarize_worker_interval" envconfig:"SUMMARIZE_WORKER_INTERVAL" default:"@every 20m"` PurgeWorkerInterval string `json:"purge_worker_interval" envconfig:"PURGE_WORKER_INTERVAL" default:"@every 1h"` DefaultBatchSize int64 `json:"default_batch_size" envconfig:"DEFAULT_BATCH_SIZE" default:"0"` DatabaseDSN string `json:"database_dsn" envconfig:"DATABASE_DSN"` Debug bool `json:"debug" envconfig:"DEBUG"` LogLevel string `json:"log_level" envconfig:"LOG_LEVEL" default:"info"` LogOutput string `json:"log_output" envconfig:"LOG_OUTPUT" default:"stdout"` IndexerMetricAddr string `json:"indexer_metric_addr" envconfig:"INDEXER_METRIC_ADDR" default:":8080"` ServerMetricAddr string `json:"server_metric_addr" envconfig:"SERVER_METRIC_ADDR" default:":8090"` PurgeSequencesInterval string `json:"purge_sequences_interval" envconfig:"PURGE_SEQUENCES_INTERVAL" default:"26h"` PurgeHourlySummariesInterval string `json:"purge_hourly_summaries_interval" envconfig:"PURGE_HOURLY_SUMMARIES_INTERVAL" default:"26h"` IndexerConfigFile string `json:"indexer_config_file" envconfig:"INDEXER_CONFIG_FILE" default:"indexer_config.json"` RouteToLive string `json:"route_to_live" envconfig:"ROUTE_TO_LIVE"` DatastoreGRPCAddr string `json:"datastore_grpc_addr" envconfig:"DATASTORE_GRPC_ADDR"` GrpcMaxRecvSize int `json:"grpc_max_recv_size" envconfig:"GRPC_MAX_RECV_SIZE" default:"1073741824"` // 1024^3 GrpcMaxSendSize int `json:"grpc_max_send_size" envconfig:"GRPC_MAX_SEND_SIZE" default:"1073741824"` // 1024^3 }
Config holds the configuration data
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
Click to show internal directories.
Click to hide internal directories.