Closed 2opremio closed 3 years ago
With regards to the following item:
either make mock implementations private or move them to separate testing package
This may not be possible. Enumerating the approaches:
MockChangeProcessor
and MockChangeReader
. However, doing this results in the horizon/internal/ingest
package breaking, since it also uses these mocked objects within its tests.testing
package: This means moving the above two objects into a testing/
subdirectory. However, doing this (and making the necessary changes e.g. package ingest
-> package testing
) means that the references to the top-level ingest library (like ingest.ChangeReader
, see mock_change_reader.go) now cause a circular reference, erroring out with:$ go test
# github.com/stellar/go/ingest
package github.com/stellar/go/ingest (test)
imports github.com/stellar/go/ingest/testing
imports github.com/stellar/go/ingest: import cycle not allowed in test
FAIL github.com/stellar/go/ingest [setup failed]
This was completed and released as stellar-ingest-v1.0.0.
We should allow users to create their own core-ingestion pipelines.
High level tasks:
expingest -> ingest
rename issue here - bartek)SingleLedgerStateReader
io
subpackage and move the code to the top levelingest
packageerrors
subpackage and moveStateError
to top levelingest
package. Also consider removingingest.EOF
alias.LedgerEntryChangeCache
to something which is more indicative of the operation it's performing (compating / coalescing changes) (@2opremio )Range
to its own fileStateVerifier
to horizon/internal ingestion package (@2opremio)GenesisLedgerStateReader
(@tamirms)HistoryArchiveBackend
github.com/go/ingest
(after discussion with @nikhilsaraf)