Versions in this module Expand all Collapse all v0 v0.1.0 Jan 28, 2021 Changes in this version + type Base64Ledger xdr.LedgerCloseMeta + func (r *Base64Ledger) UnmarshalJSON(b []byte) error + func (r Base64Ledger) MarshalJSON() ([]byte, error) + type CaptiveCoreConfig struct + BinaryPath string + CheckpointFrequency uint32 + ConfigAppendPath string + Context context.Context + HTTPPort uint + HistoryArchiveURLs []string + LedgerHashStore TrustedLedgerHashStore + Log *log.Entry + NetworkPassphrase string + type CaptiveStellarCore struct + func NewCaptive(config CaptiveCoreConfig) (*CaptiveStellarCore, error) + func (c *CaptiveStellarCore) Close() error + func (c *CaptiveStellarCore) GetLatestLedgerSequence() (uint32, error) + func (c *CaptiveStellarCore) GetLedger(sequence uint32) (bool, xdr.LedgerCloseMeta, error) + func (c *CaptiveStellarCore) IsPrepared(ledgerRange Range) (bool, error) + func (c *CaptiveStellarCore) PrepareRange(ledgerRange Range) error + type DatabaseBackend struct + func NewDatabaseBackend(dataSourceName, networkPassphrase string) (*DatabaseBackend, error) + func NewDatabaseBackendFromSession(session *db.Session, networkPassphrase string) (*DatabaseBackend, error) + func (*DatabaseBackend) IsPrepared(ledgerRange Range) (bool, error) + func (dbb *DatabaseBackend) Close() error + func (dbb *DatabaseBackend) GetLatestLedgerSequence() (uint32, error) + func (dbb *DatabaseBackend) GetLedger(sequence uint32) (bool, xdr.LedgerCloseMeta, error) + func (dbb *DatabaseBackend) PrepareRange(ledgerRange Range) error + type HorizonDBLedgerHashStore struct + func (h HorizonDBLedgerHashStore) GetLedgerHash(seq uint32) (string, bool, error) + type LatestLedgerSequenceResponse struct + Sequence uint32 + type LedgerBackend interface + Close func() error + GetLatestLedgerSequence func() (sequence uint32, err error) + GetLedger func(sequence uint32) (bool, xdr.LedgerCloseMeta, error) + IsPrepared func(ledgerRange Range) (bool, error) + PrepareRange func(ledgerRange Range) error + type LedgerResponse struct + Ledger Base64Ledger + Present bool + type MockDatabaseBackend struct + func (m *MockDatabaseBackend) Close() error + func (m *MockDatabaseBackend) GetLatestLedgerSequence() (uint32, error) + func (m *MockDatabaseBackend) GetLedger(sequence uint32) (bool, xdr.LedgerCloseMeta, error) + func (m *MockDatabaseBackend) IsPrepared(ledgerRange Range) (bool, error) + func (m *MockDatabaseBackend) PrepareRange(ledgerRange Range) error + type MockLedgerHashStore struct + func (m *MockLedgerHashStore) GetLedgerHash(seq uint32) (string, bool, error) + type PrepareRangeResponse struct + LedgerRange Range + Ready bool + ReadyDuration int + StartTime time.Time + type Range struct + func BoundedRange(from uint32, to uint32) Range + func SingleLedgerRange(ledger uint32) Range + func UnboundedRange(from uint32) Range + func (r *Range) UnmarshalJSON(b []byte) error + func (r Range) Contains(other Range) bool + func (r Range) MarshalJSON() ([]byte, error) + func (r Range) String() string + type RemoteCaptiveOption func(c *RemoteCaptiveStellarCore) + func PrepareRangePollInterval(d time.Duration) RemoteCaptiveOption + type RemoteCaptiveStellarCore struct + func NewRemoteCaptive(captiveCoreURL string, options ...RemoteCaptiveOption) (RemoteCaptiveStellarCore, error) + func (c RemoteCaptiveStellarCore) Close() error + func (c RemoteCaptiveStellarCore) GetLatestLedgerSequence() (sequence uint32, err error) + func (c RemoteCaptiveStellarCore) GetLedger(sequence uint32) (bool, xdr.LedgerCloseMeta, error) + func (c RemoteCaptiveStellarCore) IsPrepared(ledgerRange Range) (bool, error) + func (c RemoteCaptiveStellarCore) PrepareRange(ledgerRange Range) error + type TrustedLedgerHashStore interface + GetLedgerHash func(seq uint32) (string, bool, error) + func NewHorizonDBLedgerHashStore(session *db.Session) TrustedLedgerHashStore