forked from akash-network/provider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
49 lines (43 loc) · 1.61 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"
mtypes "github.com/akash-network/akash-api/go/node/market/v1beta4"
"github.com/akash-network/akash-api/go/node/types/constants"
types "github.com/akash-network/akash-api/go/node/types/v1beta3"
"github.com/akash-network/provider/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,
}
}