package conf import "sync" type Config struct { Name string Hostname string PSKPath string PublicKeyPath string PrivateKeyPath string NodeEndpointPort int64 IndexerAddresses string NativeIndexerAddresses string // multiaddrs of native indexers, comma-separated; bypasses IndexerAddresses when set PeerIDS string // TO REMOVE NodeMode string MinIndexer int MaxIndexer int // ConsensusQuorum is the minimum fraction of natives that must agree for a // candidate indexer to be considered confirmed. Range (0, 1]. Default 0.5 // (strict majority). Raise to 0.67 for stronger Byzantine resistance. ConsensusQuorum float64 } var instance *Config var once sync.Once func GetConfig() *Config { once.Do(func() { instance = &Config{} }) return instance }