github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/vent/config/config.go (about) 1 package config 2 3 import ( 4 "time" 5 6 "github.com/hyperledger/burrow/crypto" 7 "github.com/hyperledger/burrow/vent/chain" 8 "github.com/hyperledger/burrow/vent/sqlsol" 9 "github.com/hyperledger/burrow/vent/types" 10 ) 11 12 const DefaultPostgresDBURL = "postgres://postgres@localhost:5432/postgres?sslmode=disable" 13 14 // VentConfig is a set of configuration parameters 15 type VentConfig struct { 16 DBAdapter string 17 DBURL string 18 DBSchema string 19 ChainAddress string 20 HTTPListenAddress string 21 BlockConsumerConfig chain.BlockConsumerConfig 22 // Global contracts to watch specified as hex 23 WatchAddresses []crypto.Address 24 MinimumHeight uint64 25 SpecFileOrDirs []string 26 AbiFileOrDirs []string 27 SpecOpt sqlsol.SpecOpt 28 // Announce status every AnnouncePeriod 29 AnnounceEvery time.Duration 30 } 31 32 // DefaultFlags returns a configuration with default values 33 func DefaultVentConfig() *VentConfig { 34 return &VentConfig{ 35 DBAdapter: types.PostgresDB, 36 DBURL: DefaultPostgresDBURL, 37 DBSchema: "vent", 38 ChainAddress: "localhost:10997", 39 HTTPListenAddress: "0.0.0.0:8080", 40 SpecOpt: sqlsol.None, 41 AnnounceEvery: time.Second * 5, 42 } 43 }