Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLedger ¶
NewLedger creates a ledger instance based on the configuration. If LedgerServiceAddr is set, it creates a remote ledger client. Otherwise, it creates a local ledger with WAL and compactor. triggerCheckpoint is a runtime control signal to trigger checkpoint on next segment finish (can be nil for remote ledger).
Types ¶
type Config ¶
type Config struct {
// Remote ledger service configuration
LedgerServiceAddr string // gRPC address for remote ledger service (empty means use local ledger)
LedgerMaxRequestSize uint // Maximum request message size in bytes for remote ledger client (0 = default 1 GiB)
LedgerMaxResponseSize uint // Maximum response message size in bytes for remote ledger client (0 = default 1 GiB)
// Local ledger configuration
Triedir string
MTrieCacheSize uint32
CheckpointDistance uint
CheckpointsToKeep uint
MetricsRegisterer prometheus.Registerer
WALMetrics module.WALMetrics
LedgerMetrics module.LedgerMetrics
Logger zerolog.Logger
}
Config holds configuration for creating a ledger instance.
Click to show internal directories.
Click to hide internal directories.