Versions in this module Expand all Collapse all v1 v1.11.1 Jun 10, 2024 Changes in this version + const Pubnet + const Testnet + func CreateHistoryArchiveFromNetworkName(ctx context.Context, networkName string) (historyarchive.ArchiveInterface, error) + func CreateLedgerCloseMeta(ledgerSeq uint32) xdr.LedgerCloseMeta + func GetHistoryArchivesCheckPointFrequency() uint32 + func GetLatestLedgerSequenceFromHistoryArchives(archive historyarchive.ArchiveInterface) (uint32, error) + type DataStore interface + Close func() error + Exists func(ctx context.Context, path string) (bool, error) + GetFile func(ctx context.Context, path string) (io.ReadCloser, error) + PutFile func(ctx context.Context, path string, in io.WriterTo) error + PutFileIfNotExists func(ctx context.Context, path string, in io.WriterTo) (bool, error) + Size func(ctx context.Context, path string) (int64, error) + func NewDataStore(ctx context.Context, datastoreConfig DataStoreConfig, network string) (DataStore, error) + func NewGCSDataStore(ctx context.Context, params map[string]string, network string) (DataStore, error) + type DataStoreConfig struct + Params map[string]string + Type string + type GCSDataStore struct + func (b GCSDataStore) Close() error + func (b GCSDataStore) Exists(ctx context.Context, pth string) (bool, error) + func (b GCSDataStore) GetFile(ctx context.Context, filePath string) (io.ReadCloser, error) + func (b GCSDataStore) PutFile(ctx context.Context, filePath string, in io.WriterTo) error + func (b GCSDataStore) PutFileIfNotExists(ctx context.Context, filePath string, in io.WriterTo) (bool, error) + func (b GCSDataStore) Size(ctx context.Context, pth string) (int64, error) + type LedgerBatchConfig struct + FileSuffix string + FilesPerPartition uint32 + LedgersPerFile uint32 + func (ec LedgerBatchConfig) GetObjectKeyFromSequenceNumber(ledgerSeq uint32) string + func (ec LedgerBatchConfig) GetSequenceNumberEndBoundary(ledgerSeq uint32) uint32 + func (ec LedgerBatchConfig) GetSequenceNumberStartBoundary(ledgerSeq uint32) uint32 + type LedgerMetaArchive struct + Data xdr.LedgerCloseMetaBatch + ObjectKey string + func NewLedgerMetaArchive(key string, startSeq uint32, endSeq uint32) *LedgerMetaArchive + func (f *LedgerMetaArchive) AddLedger(ledgerCloseMeta xdr.LedgerCloseMeta) error + func (f *LedgerMetaArchive) GetEndLedgerSequence() uint32 + func (f *LedgerMetaArchive) GetLedger(sequence uint32) (xdr.LedgerCloseMeta, error) + func (f *LedgerMetaArchive) GetLedgerCount() uint32 + func (f *LedgerMetaArchive) GetObjectKey() string + func (f *LedgerMetaArchive) GetStartLedgerSequence() uint32 + type MockDataStore struct + func (m *MockDataStore) Close() error + func (m *MockDataStore) Exists(ctx context.Context, path string) (bool, error) + func (m *MockDataStore) GetFile(ctx context.Context, path string) (io.ReadCloser, error) + func (m *MockDataStore) PutFile(ctx context.Context, path string, in io.WriterTo) error + func (m *MockDataStore) PutFileIfNotExists(ctx context.Context, path string, in io.WriterTo) (bool, error) + func (m *MockDataStore) Size(ctx context.Context, path string) (int64, error) + type MockResumableManager struct + func (m *MockResumableManager) FindStart(ctx context.Context, start, end uint32) (absentLedger uint32, ok bool, err error) + type ResumableManager interface + FindStart func(ctx context.Context, start, end uint32) (absentLedger uint32, ok bool, err error) + func NewResumableManager(dataStore DataStore, network string, ledgerBatchConfig LedgerBatchConfig, ...) ResumableManager