/
config.go
50 lines (36 loc) · 942 Bytes
/
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
50
package server
import (
"net"
"github.com/hashicorp/go-hclog"
"github.com/Coinmaxify/Coinmaxify/chain"
"github.com/Coinmaxify/Coinmaxify/network"
"github.com/Coinmaxify/Coinmaxify/secrets"
)
const DefaultGRPCPort int = 9632
const DefaultJSONRPCPort int = 8545
// Config is used to parametrize the minimal client
type Config struct {
Chain *chain.Chain
JSONRPC *JSONRPC
GRPCAddr *net.TCPAddr
LibP2PAddr *net.TCPAddr
PriceLimit uint64
MaxSlots uint64
BlockTime uint64
Telemetry *Telemetry
Network *network.Config
DataDir string
RestoreFile *string
Seal bool
SecretsManager *secrets.SecretsManagerConfig
LogLevel hclog.Level
}
// Telemetry holds the config details for metric services
type Telemetry struct {
PrometheusAddr *net.TCPAddr
}
// JSONRPC holds the config details for the JSON-RPC server
type JSONRPC struct {
JSONRPCAddr *net.TCPAddr
AccessControlAllowOrigin []string
}