neo-go/pkg/config/oracle_config.go
Roman Khimov 7a1c1638e4 oracle: specify neofs timeout as timeout, set default if 0
There has to be some sane default and we'd like configuration to be consistent
with other timeout values.
2021-04-06 17:08:04 +03:00

23 lines
940 B
Go

package config
import "time"
// OracleConfiguration is a config for the oracle module.
type OracleConfiguration struct {
Enabled bool `yaml:"Enabled"`
AllowPrivateHost bool `yaml:"AllowPrivateHost"`
Nodes []string `yaml:"Nodes"`
NeoFS NeoFSConfiguration `yaml:"NeoFS"`
MaxTaskTimeout time.Duration `yaml:"MaxTaskTimeout"`
RefreshInterval time.Duration `yaml:"RefreshInterval"`
MaxConcurrentRequests int `yaml:"MaxConcurrentRequests"`
RequestTimeout time.Duration `yaml:"RequestTimeout"`
ResponseTimeout time.Duration `yaml:"ResponseTimeout"`
UnlockWallet Wallet `yaml:"UnlockWallet"`
}
// NeoFSConfiguration is a config for the NeoFS service.
type NeoFSConfiguration struct {
Nodes []string `yaml:"Nodes"`
Timeout time.Duration `yaml:"Timeout"`
}