forked from stellar/go
/
config.go
43 lines (39 loc) · 1.48 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 horizon
import (
"github.com/PuerkitoBio/throttled"
"github.com/sirupsen/logrus"
)
// Config is the configuration for horizon. It get's populated by the
// app's main function and is provided to NewApp.
type Config struct {
DatabaseURL string
StellarCoreDatabaseURL string
StellarCoreURL string
Port int
RateLimit throttled.Quota
RedisURL string
FriendbotURL string
LogLevel logrus.Level
SentryDSN string
LogglyHost string
LogglyToken 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 is a boolean that indicates whether or not 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
}