This repository has been archived by the owner on Mar 16, 2024. It is now read-only.
/
config.go
58 lines (47 loc) · 1.74 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
50
51
52
53
54
55
56
57
58
package proxy
import (
"github.com/CryptoManiac/open-ethereum-pool/api"
"github.com/CryptoManiac/open-ethereum-pool/payouts"
"github.com/CryptoManiac/open-ethereum-pool/shifts"
"github.com/CryptoManiac/open-ethereum-pool/policy"
"github.com/CryptoManiac/open-ethereum-pool/storage"
)
type Config struct {
Name string `json:"name"`
Proxy Proxy `json:"proxy"`
Api api.ApiConfig `json:"api"`
Upstream []Upstream `json:"upstream"`
UpstreamCheckInterval string `json:"upstreamCheckInterval"`
Threads int `json:"threads"`
Coin string `json:"coin"`
Redis storage.Config `json:"redis"`
Payouts payouts.PayoutsConfig `json:"payouts"`
Shifts shifts.ShiftsConfig `json:"shifts"`
}
type Proxy struct {
Enabled bool `json:"enabled"`
Listen string `json:"listen"`
LimitHeadersSize int `json:"limitHeadersSize"`
LimitBodySize int64 `json:"limitBodySize"`
BehindReverseProxy bool `json:"behindReverseProxy"`
BlockRefreshInterval string `json:"blockRefreshInterval"`
Difficulty int64 `json:"difficulty"`
MiningFee float64 `json:"miningFee"`
StateUpdateInterval string `json:"stateUpdateInterval"`
HashrateExpiration string `json:"hashrateExpiration"`
Policy policy.Config `json:"policy"`
MaxFails int64 `json:"maxFails"`
HealthCheck bool `json:"healthCheck"`
Stratum Stratum `json:"stratum"`
}
type Stratum struct {
Enabled bool `json:"enabled"`
Listen string `json:"listen"`
Timeout string `json:"timeout"`
MaxConn int `json:"maxConn"`
}
type Upstream struct {
Name string `json:"name"`
Url string `json:"url"`
Timeout string `json:"timeout"`
}