-
Notifications
You must be signed in to change notification settings - Fork 25
/
config.go
43 lines (37 loc) · 1.28 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
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"
"github.com/akash-network/provider/cluster"
)
type Config struct {
ClusterWaitReadyDuration time.Duration
ClusterPublicHostname string
ClusterExternalPortQuantity uint
BidPricingStrategy bidengine.BidPricingStrategy
BidDeposit sdk.Coin
BidTimeout time.Duration
ManifestTimeout time.Duration
BalanceCheckerCfg BalanceCheckerConfig
Attributes types.Attributes
MaxGroupVolumes int
RPCQueryTimeout time.Duration
CachedResultMaxAge time.Duration
cluster.Config
}
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,
Config: cluster.NewDefaultConfig(),
}
}