Documentation ¶
Index ¶
Constants ¶
View Source
const ( // mainnet p2p config. MainNetP2ppNetworkID = "/wormhole/mainnet/2" MainNetP2pBootstrap = "" /* 341-byte string literal not displayed */ MainNetP2pPort uint = 8999 // testnet p2p config. TestNetP2ppNetworkID = "/wormhole/testnet/2/1" TestNetP2pBootstrap = "" /* 223-byte string literal not displayed */ TestNetP2pPort uint = 8999 // devnet p2p config. DevNetP2ppNetworkID = "/wormhole/dev" DevNetP2pBootstrap = "/dns4/guardian-0.guardian/udp/8999/quic/p2p/12D3KooWL3XJ9EMCyZvmmGXL2LMiVBtrVa2BuESsJiXkSj7333Jw" DevNetP2pPort uint = 8999 )
p2p network configuration constants.
View Source
const ( DbLayerMongo = "mongo" DbLayerPostgres = "postgres" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AwsConfiguration ¶
type AwsConfiguration struct { AwsRegion string `env:"AWS_REGION,required"` AwsAccessKeyID string `env:"AWS_ACCESS_KEY_ID"` AwsSecretAccessKey string `env:"AWS_SECRET_ACCESS_KEY"` AwsEndpoint string `env:"AWS_ENDPOINT"` SqsUrl string `env:"SQS_URL,required"` ObservationsSqsUrl string `env:"OBSERVATIONS_SQS_URL,required"` EventsSnsUrl string `env:"EVENTS_SNS_URL,required"` VaaPipelineSnsUrl string `env:"VAA_PIPELINE_SNS_URL,required"` }
type Configuration ¶
type Configuration struct { P2pNetwork string `env:"P2P_NETWORK,required"` Environment string `env:"ENVIRONMENT,required"` LogLevel string `env:"LOG_LEVEL,default=warn"` MongoUri string `env:"MONGODB_URI,required"` MongoDatabase string `env:"MONGODB_DATABASE,required"` MongoEnableQueryLog bool `env:"MONGODB_ENABLE_QUERY_LOG"` ObservationsChannelSize int `env:"OBSERVATIONS_CHANNEL_SIZE,required"` VaasChannelSize int `env:"VAAS_CHANNEL_SIZE,required"` HeartbeatsChannelSize int `env:"HEARTBEATS_CHANNEL_SIZE,required"` GovernorConfigChannelSize int `env:"GOVERNOR_CONFIG_CHANNEL_SIZE,required"` GovernorStatusChannelSize int `env:"GOVERNOR_STATUS_CHANNEL_SIZE,required"` VaasWorkersSize int `env:"VAAS_WORKERS_SIZE,default=5"` ObservationsWorkersSize int `env:"OBSERVATIONS_WORKERS_SIZE,default=10"` AlertEnabled bool `env:"ALERT_ENABLED"` AlertApiKey string `env:"ALERT_API_KEY"` MetricsEnabled bool `env:"METRICS_ENABLED"` ApiPort uint `env:"API_PORT,required"` P2pPort uint `env:"P2P_PORT,required"` PprofEnabled bool `env:"PPROF_ENABLED"` MaxHealthTimeSeconds int64 `env:"MAX_HEALTH_TIME_SECONDS,default=60"` IsLocal bool Redis *RedisConfiguration Aws *AwsConfiguration ObservationsDedup Cache `env:", prefix=OBSERVATIONS_DEDUP_,required"` ObservationsTxHash Cache `env:", prefix=OBSERVATIONS_TX_HASH_,required"` VaasDedup Cache `env:", prefix=VAAS_DEDUP_,required"` VaasPythDedup Cache `env:", prefix=VAAS_PYTH_DEDUP_,required"` EthereumUrl string `env:"ETHEREUM_URL,required"` DatabaseUrl string `env:"DB_URL"` DatabaseLogEnabled bool `env:"DB_LOG_ENABLED"` DbLayer string `env:"DB_LAYER,default=mongo"` // mongo, postgres. Default is mongo. }
func New ¶
func New(ctx context.Context, isLocal *bool) (*Configuration, error)
New creates a configuration with the values from .env file and environment variables.
func (*Configuration) GetP2pNetwork ¶
func (c *Configuration) GetP2pNetwork() (*P2pNetworkConfig, error)
GetP2pNetwork get p2p network config.
func (*Configuration) GetPrefix ¶
func (c *Configuration) GetPrefix() string
type P2pNetworkConfig ¶
P2pNetworkConfig config struct.
type RedisConfiguration ¶
Click to show internal directories.
Click to hide internal directories.