forked from stellar/go
/
config.go
56 lines (53 loc) · 2.03 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
package horizon
import (
"net/url"
"time"
"github.com/sirupsen/logrus"
"github.com/throttled/throttled"
)
// Config is the configuration for horizon. It gets populated by the
// app's main function and is provided to NewApp.
type Config struct {
DatabaseURL string
StellarCoreDatabaseURL string
StellarCoreURL string
Port uint
MaxDBConnections int
SSEUpdateFrequency time.Duration
ConnectionTimeout time.Duration
RateLimit *throttled.RateQuota
RateLimitRedisKey string
RedisURL string
FriendbotURL *url.URL
LogLevel logrus.Level
LogFile string
// MaxPathLength is the maximum length of the path returned by `/paths` endpoint.
MaxPathLength uint
NetworkPassphrase string
SentryDSN string
LogglyToken string
LogglyTag string
// TLSCert is a path to a certificate file to use for horizon's TLS config
TLSCert string
// TLSKey is the path to a private key file to use for horizon's TLS config
TLSKey string
// Ingest toggles whether this horizon instance should run the data ingestion subsystem.
Ingest bool
// HistoryRetentionCount represents the minimum number of ledgers worth of
// history data to retain in the horizon database. For the purposes of
// determining a "retention duration", each ledger roughly corresponds to 10
// seconds of real time.
HistoryRetentionCount uint
// StaleThreshold represents the number of ledgers a history database may be
// out-of-date by before horizon begins to respond with an error to history
// requests.
StaleThreshold uint
// SkipCursorUpdate causes the ingestor to skip reporting the "last imported
// ledger" state to stellar-core.
SkipCursorUpdate bool
// EnableAssetStats is a feature flag that determines whether to calculate
// asset stats during the ingestion and expose `/assets` endpoint.
// Enabling it has a negative impact on CPU when ingesting ledgers full of
// many different assets related operations.
EnableAssetStats bool
}