github.com/iotexproject/iotex-core@v1.14.1-rc1/nodeinfo/config.go (about) 1 // Copyright (c) 2022 IoTeX Foundation 2 // This source code is provided 'as is' and no warranties are given as to title or non-infringement, merchantability 3 // or fitness for purpose and, to the extent permitted by law, all liability for your use of the code is disclaimed. 4 // This source code is governed by Apache License 2.0 that can be found in the LICENSE file. 5 6 package nodeinfo 7 8 import "time" 9 10 // Config node config 11 type Config struct { 12 EnableBroadcastNodeInfo bool `yaml:"enableBroadcastNodeInfo"` 13 BroadcastNodeInfoInterval time.Duration `yaml:"broadcastNodeInfoInterval"` 14 BroadcastListTTL time.Duration `yaml:"broadcastListTTL"` 15 NodeMapSize int `yaml:"nodeMapSize"` 16 } 17 18 // DefaultConfig is the default config 19 var DefaultConfig = Config{ 20 EnableBroadcastNodeInfo: false, 21 BroadcastNodeInfoInterval: 5 * time.Minute, 22 BroadcastListTTL: 30 * time.Minute, 23 NodeMapSize: 1000, 24 }