-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathconfig.go
49 lines (43 loc) · 1.56 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package provider
import (
"time"
sdk "github.com/cosmos/cosmos-sdk/types"
types "github.com/ovrclk/akash/types/v1beta2"
"github.com/ovrclk/akash/validation/constants"
mtypes "github.com/ovrclk/akash/x/market/types/v1beta2"
"github.com/ovrclk/provider-services/bidengine"
)
type Config struct {
ClusterWaitReadyDuration time.Duration
ClusterPublicHostname string
ClusterExternalPortQuantity uint
InventoryResourcePollPeriod time.Duration
InventoryResourceDebugFrequency uint
BidPricingStrategy bidengine.BidPricingStrategy
BidDeposit sdk.Coin
CPUCommitLevel float64
MemoryCommitLevel float64
StorageCommitLevel float64
MaxGroupVolumes int
BlockedHostnames []string
BidTimeout time.Duration
ManifestTimeout time.Duration
BalanceCheckerCfg BalanceCheckerConfig
Attributes types.Attributes
DeploymentIngressStaticHosts bool
DeploymentIngressDomain string
ClusterSettings map[interface{}]interface{}
RPCQueryTimeout time.Duration
CachedResultMaxAge time.Duration
}
func NewDefaultConfig() Config {
return Config{
ClusterWaitReadyDuration: time.Second * 10,
BidDeposit: mtypes.DefaultBidMinDeposit,
BalanceCheckerCfg: BalanceCheckerConfig{
LeaseFundsCheckInterval: 1 * time.Minute,
WithdrawalPeriod: 24 * time.Hour,
},
MaxGroupVolumes: constants.DefaultMaxGroupVolumes,
}
}