diff --git a/api/handlers_e2e_test.go b/api/handlers_e2e_test.go index 154ef10a7..3d00cd107 100644 --- a/api/handlers_e2e_test.go +++ b/api/handlers_e2e_test.go @@ -4,7 +4,6 @@ import ( "context" "encoding/base64" "fmt" - test2 "github.com/sirupsen/logrus/hooks/test" "io/ioutil" "net/http" "net/http/httptest" @@ -15,6 +14,7 @@ import ( "github.com/labstack/echo/v4" "github.com/sirupsen/logrus" + test2 "github.com/sirupsen/logrus/hooks/test" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -29,10 +29,10 @@ import ( "github.com/algorand/go-algorand/rpcs" "github.com/algorand/indexer/api/generated/v2" + "github.com/algorand/indexer/conduit/plugins/processors/blockprocessor" "github.com/algorand/indexer/idb" "github.com/algorand/indexer/idb/postgres" pgtest "github.com/algorand/indexer/idb/postgres/testing" - "github.com/algorand/indexer/processors/blockprocessor" "github.com/algorand/indexer/util/test" ) diff --git a/cmd/algorand-indexer/daemon.go b/cmd/algorand-indexer/daemon.go index 179635550..4a816db83 100644 --- a/cmd/algorand-indexer/daemon.go +++ b/cmd/algorand-indexer/daemon.go @@ -22,12 +22,12 @@ import ( "github.com/algorand/indexer/api/generated/v2" "github.com/algorand/indexer/conduit" "github.com/algorand/indexer/conduit/pipeline" + _ "github.com/algorand/indexer/conduit/plugins/exporters/postgresql" + _ "github.com/algorand/indexer/conduit/plugins/importers/algod" + _ "github.com/algorand/indexer/conduit/plugins/processors/blockprocessor" "github.com/algorand/indexer/config" - _ "github.com/algorand/indexer/exporters/postgresql" "github.com/algorand/indexer/fetcher" "github.com/algorand/indexer/idb" - _ "github.com/algorand/indexer/importers/algod" - _ "github.com/algorand/indexer/processors/blockprocessor" iutil "github.com/algorand/indexer/util" ) diff --git a/cmd/conduit/main.go b/cmd/conduit/main.go index 4aee4f002..cf3b3ec4c 100644 --- a/cmd/conduit/main.go +++ b/cmd/conduit/main.go @@ -18,9 +18,9 @@ import ( "github.com/algorand/indexer/util/metrics" // We need to import these so that the package wide init() function gets called - _ "github.com/algorand/indexer/exporters/all" - _ "github.com/algorand/indexer/importers/all" - _ "github.com/algorand/indexer/processors/all" + _ "github.com/algorand/indexer/conduit/plugins/exporters/all" + _ "github.com/algorand/indexer/conduit/plugins/importers/all" + _ "github.com/algorand/indexer/conduit/plugins/processors/all" ) var ( diff --git a/conduit/config.go b/conduit/config.go index 8ee7571a8..aa455b6dc 100644 --- a/conduit/config.go +++ b/conduit/config.go @@ -4,8 +4,9 @@ import ( "fmt" "strings" - "github.com/algorand/go-algorand/util" "github.com/spf13/pflag" + + "github.com/algorand/go-algorand/util" ) // DefaultConfigName is the default conduit configuration filename. diff --git a/conduit/hooks.go b/conduit/hooks.go index 0e8d85ba8..40a608942 100644 --- a/conduit/hooks.go +++ b/conduit/hooks.go @@ -1,8 +1,9 @@ package conduit import ( - "github.com/algorand/indexer/data" "github.com/prometheus/client_golang/prometheus" + + "github.com/algorand/indexer/data" ) // OnCompleteFunc is the signature for the Completed functional interface. diff --git a/conduit/pipeline/metadata.go b/conduit/pipeline/metadata.go index 61b3d79e6..8cfc0f104 100644 --- a/conduit/pipeline/metadata.go +++ b/conduit/pipeline/metadata.go @@ -4,9 +4,9 @@ package pipeline import ( "github.com/algorand/indexer/conduit" - "github.com/algorand/indexer/exporters" - "github.com/algorand/indexer/importers" - "github.com/algorand/indexer/processors" + "github.com/algorand/indexer/conduit/plugins/exporters" + "github.com/algorand/indexer/conduit/plugins/importers" + "github.com/algorand/indexer/conduit/plugins/processors" ) // AllMetadata gets a slice with metadata from all registered plugins. diff --git a/conduit/pipeline/metadata_test.go b/conduit/pipeline/metadata_test.go index 1f1b9b1e7..efa55ad6e 100644 --- a/conduit/pipeline/metadata_test.go +++ b/conduit/pipeline/metadata_test.go @@ -9,10 +9,10 @@ import ( ) import ( - _ "github.com/algorand/indexer/exporters/all" - _ "github.com/algorand/indexer/exporters/example" - _ "github.com/algorand/indexer/importers/all" - _ "github.com/algorand/indexer/processors/all" + _ "github.com/algorand/indexer/conduit/plugins/exporters/all" + _ "github.com/algorand/indexer/conduit/plugins/exporters/example" + _ "github.com/algorand/indexer/conduit/plugins/importers/all" + _ "github.com/algorand/indexer/conduit/plugins/processors/all" ) // TestSamples ensures that all plugins contain a sample file with valid yaml. diff --git a/conduit/pipeline/pipeline.go b/conduit/pipeline/pipeline.go index ce5bf7ade..98a7fcc30 100644 --- a/conduit/pipeline/pipeline.go +++ b/conduit/pipeline/pipeline.go @@ -23,11 +23,11 @@ import ( "gopkg.in/yaml.v3" "github.com/algorand/indexer/conduit" + "github.com/algorand/indexer/conduit/plugins" + "github.com/algorand/indexer/conduit/plugins/exporters" + "github.com/algorand/indexer/conduit/plugins/importers" + "github.com/algorand/indexer/conduit/plugins/processors" "github.com/algorand/indexer/data" - "github.com/algorand/indexer/exporters" - "github.com/algorand/indexer/importers" - "github.com/algorand/indexer/plugins" - "github.com/algorand/indexer/processors" "github.com/algorand/indexer/util" "github.com/algorand/indexer/util/metrics" ) diff --git a/conduit/pipeline/pipeline_test.go b/conduit/pipeline/pipeline_test.go index a48102a32..ba1f41b5a 100644 --- a/conduit/pipeline/pipeline_test.go +++ b/conduit/pipeline/pipeline_test.go @@ -10,20 +10,21 @@ import ( "testing" "time" - "github.com/algorand/go-algorand/crypto" log "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/algorand/go-algorand/crypto" "github.com/algorand/go-algorand/data/basics" "github.com/algorand/go-algorand/data/bookkeeping" + "github.com/algorand/indexer/conduit" + "github.com/algorand/indexer/conduit/plugins" + "github.com/algorand/indexer/conduit/plugins/exporters" + "github.com/algorand/indexer/conduit/plugins/importers" + "github.com/algorand/indexer/conduit/plugins/processors" "github.com/algorand/indexer/data" - "github.com/algorand/indexer/exporters" - "github.com/algorand/indexer/importers" - "github.com/algorand/indexer/plugins" - "github.com/algorand/indexer/processors" ) // TestPipelineConfigValidity tests the Valid() function for the Config diff --git a/plugins/config.go b/conduit/plugins/config.go similarity index 100% rename from plugins/config.go rename to conduit/plugins/config.go diff --git a/exporters/README.md b/conduit/plugins/exporters/README.md similarity index 100% rename from exporters/README.md rename to conduit/plugins/exporters/README.md diff --git a/conduit/plugins/exporters/all/all.go b/conduit/plugins/exporters/all/all.go new file mode 100644 index 000000000..52cf359e4 --- /dev/null +++ b/conduit/plugins/exporters/all/all.go @@ -0,0 +1,8 @@ +package all + +import ( + // Call package wide init function + _ "github.com/algorand/indexer/conduit/plugins/exporters/filewriter" + _ "github.com/algorand/indexer/conduit/plugins/exporters/noop" + _ "github.com/algorand/indexer/conduit/plugins/exporters/postgresql" +) diff --git a/exporters/example/example_exporter.go b/conduit/plugins/exporters/example/example_exporter.go similarity index 95% rename from exporters/example/example_exporter.go rename to conduit/plugins/exporters/example/example_exporter.go index c5913f129..7c20922e7 100644 --- a/exporters/example/example_exporter.go +++ b/conduit/plugins/exporters/example/example_exporter.go @@ -9,9 +9,9 @@ import ( "github.com/algorand/go-algorand/data/bookkeeping" "github.com/algorand/indexer/conduit" + "github.com/algorand/indexer/conduit/plugins" + "github.com/algorand/indexer/conduit/plugins/exporters" "github.com/algorand/indexer/data" - "github.com/algorand/indexer/exporters" - "github.com/algorand/indexer/plugins" ) // This is our exporter object. It should store all the in memory data required to run the Exporter. diff --git a/exporters/example/example_exporter_test.go b/conduit/plugins/exporters/example/example_exporter_test.go similarity index 93% rename from exporters/example/example_exporter_test.go rename to conduit/plugins/exporters/example/example_exporter_test.go index 32959e016..5f4efb1c5 100644 --- a/exporters/example/example_exporter_test.go +++ b/conduit/plugins/exporters/example/example_exporter_test.go @@ -4,9 +4,10 @@ import ( "context" "testing" - "github.com/algorand/indexer/data" - "github.com/algorand/indexer/exporters" "github.com/stretchr/testify/assert" + + "github.com/algorand/indexer/conduit/plugins/exporters" + "github.com/algorand/indexer/data" ) var exCons = exporters.ExporterConstructorFunc(func() exporters.Exporter { diff --git a/exporters/example/sample.yaml b/conduit/plugins/exporters/example/sample.yaml similarity index 100% rename from exporters/example/sample.yaml rename to conduit/plugins/exporters/example/sample.yaml diff --git a/exporters/exporter.go b/conduit/plugins/exporters/exporter.go similarity index 96% rename from exporters/exporter.go rename to conduit/plugins/exporters/exporter.go index 72530e0cf..976edbd5c 100644 --- a/exporters/exporter.go +++ b/conduit/plugins/exporters/exporter.go @@ -6,8 +6,8 @@ import ( "github.com/sirupsen/logrus" "github.com/algorand/indexer/conduit" + "github.com/algorand/indexer/conduit/plugins" "github.com/algorand/indexer/data" - "github.com/algorand/indexer/plugins" ) // Exporter defines the interface for plugins diff --git a/exporters/exporter_factory.go b/conduit/plugins/exporters/exporter_factory.go similarity index 100% rename from exporters/exporter_factory.go rename to conduit/plugins/exporters/exporter_factory.go diff --git a/exporters/exporter_factory_test.go b/conduit/plugins/exporters/exporter_factory_test.go similarity index 100% rename from exporters/exporter_factory_test.go rename to conduit/plugins/exporters/exporter_factory_test.go diff --git a/exporters/filewriter/file_exporter.go b/conduit/plugins/exporters/filewriter/file_exporter.go similarity index 96% rename from exporters/filewriter/file_exporter.go rename to conduit/plugins/exporters/filewriter/file_exporter.go index 06f7fceb8..4c19cdece 100644 --- a/exporters/filewriter/file_exporter.go +++ b/conduit/plugins/exporters/filewriter/file_exporter.go @@ -12,9 +12,9 @@ import ( "gopkg.in/yaml.v3" "github.com/algorand/indexer/conduit" + "github.com/algorand/indexer/conduit/plugins" + "github.com/algorand/indexer/conduit/plugins/exporters" "github.com/algorand/indexer/data" - "github.com/algorand/indexer/exporters" - "github.com/algorand/indexer/plugins" "github.com/algorand/indexer/util" ) diff --git a/exporters/filewriter/file_exporter_config.go b/conduit/plugins/exporters/filewriter/file_exporter_config.go similarity index 100% rename from exporters/filewriter/file_exporter_config.go rename to conduit/plugins/exporters/filewriter/file_exporter_config.go diff --git a/exporters/filewriter/file_exporter_test.go b/conduit/plugins/exporters/filewriter/file_exporter_test.go similarity index 98% rename from exporters/filewriter/file_exporter_test.go rename to conduit/plugins/exporters/filewriter/file_exporter_test.go index 9af9664d6..d681729f5 100644 --- a/exporters/filewriter/file_exporter_test.go +++ b/conduit/plugins/exporters/filewriter/file_exporter_test.go @@ -16,9 +16,9 @@ import ( "github.com/algorand/go-algorand/data/bookkeeping" "github.com/algorand/go-algorand/ledger/ledgercore" + "github.com/algorand/indexer/conduit/plugins" + "github.com/algorand/indexer/conduit/plugins/exporters" "github.com/algorand/indexer/data" - "github.com/algorand/indexer/exporters" - "github.com/algorand/indexer/plugins" "github.com/algorand/indexer/util" testutil "github.com/algorand/indexer/util/test" ) diff --git a/exporters/filewriter/sample.yaml b/conduit/plugins/exporters/filewriter/sample.yaml similarity index 100% rename from exporters/filewriter/sample.yaml rename to conduit/plugins/exporters/filewriter/sample.yaml diff --git a/exporters/noop/noop_exporter.go b/conduit/plugins/exporters/noop/noop_exporter.go similarity index 94% rename from exporters/noop/noop_exporter.go rename to conduit/plugins/exporters/noop/noop_exporter.go index ad1631df3..3eae03421 100644 --- a/exporters/noop/noop_exporter.go +++ b/conduit/plugins/exporters/noop/noop_exporter.go @@ -11,9 +11,9 @@ import ( "github.com/algorand/go-algorand/data/bookkeeping" "github.com/algorand/indexer/conduit" + "github.com/algorand/indexer/conduit/plugins" + "github.com/algorand/indexer/conduit/plugins/exporters" "github.com/algorand/indexer/data" - "github.com/algorand/indexer/exporters" - "github.com/algorand/indexer/plugins" ) var implementationName = "noop" diff --git a/exporters/noop/noop_exporter_config.go b/conduit/plugins/exporters/noop/noop_exporter_config.go similarity index 100% rename from exporters/noop/noop_exporter_config.go rename to conduit/plugins/exporters/noop/noop_exporter_config.go diff --git a/exporters/noop/noop_exporter_test.go b/conduit/plugins/exporters/noop/noop_exporter_test.go similarity index 93% rename from exporters/noop/noop_exporter_test.go rename to conduit/plugins/exporters/noop/noop_exporter_test.go index fb1d91910..8a0a8dbfa 100644 --- a/exporters/noop/noop_exporter_test.go +++ b/conduit/plugins/exporters/noop/noop_exporter_test.go @@ -4,13 +4,15 @@ import ( "context" "testing" + "github.com/stretchr/testify/assert" + "gopkg.in/yaml.v3" + "github.com/algorand/go-algorand/data/bookkeeping" + + "github.com/algorand/indexer/conduit/plugins" + "github.com/algorand/indexer/conduit/plugins/exporters" "github.com/algorand/indexer/data" - "github.com/algorand/indexer/exporters" - "github.com/algorand/indexer/plugins" testutil "github.com/algorand/indexer/util/test" - "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" ) var nc = exporters.ExporterConstructorFunc(func() exporters.Exporter { diff --git a/exporters/noop/sample.yaml b/conduit/plugins/exporters/noop/sample.yaml similarity index 100% rename from exporters/noop/sample.yaml rename to conduit/plugins/exporters/noop/sample.yaml diff --git a/exporters/postgresql/postgresql_exporter.go b/conduit/plugins/exporters/postgresql/postgresql_exporter.go similarity index 96% rename from exporters/postgresql/postgresql_exporter.go rename to conduit/plugins/exporters/postgresql/postgresql_exporter.go index ffeb5ae7f..00d5d753d 100644 --- a/exporters/postgresql/postgresql_exporter.go +++ b/conduit/plugins/exporters/postgresql/postgresql_exporter.go @@ -14,14 +14,14 @@ import ( "github.com/algorand/go-algorand/ledger/ledgercore" "github.com/algorand/indexer/conduit" + "github.com/algorand/indexer/conduit/plugins" + "github.com/algorand/indexer/conduit/plugins/exporters" + "github.com/algorand/indexer/conduit/plugins/exporters/postgresql/util" "github.com/algorand/indexer/data" - "github.com/algorand/indexer/exporters" - "github.com/algorand/indexer/exporters/util" "github.com/algorand/indexer/idb" "github.com/algorand/indexer/importer" // Necessary to ensure the postgres implementation has been registered in the idb factory _ "github.com/algorand/indexer/idb/postgres" - "github.com/algorand/indexer/plugins" ) const exporterName = "postgresql" diff --git a/exporters/postgresql/postgresql_exporter_config.go b/conduit/plugins/exporters/postgresql/postgresql_exporter_config.go similarity index 90% rename from exporters/postgresql/postgresql_exporter_config.go rename to conduit/plugins/exporters/postgresql/postgresql_exporter_config.go index fde17952c..ecb33dfba 100644 --- a/exporters/postgresql/postgresql_exporter_config.go +++ b/conduit/plugins/exporters/postgresql/postgresql_exporter_config.go @@ -1,6 +1,8 @@ package postgresql -import "github.com/algorand/indexer/exporters/util" +import ( + "github.com/algorand/indexer/conduit/plugins/exporters/postgresql/util" +) // serde for converting an ExporterConfig to/from a PostgresqlExporterConfig diff --git a/exporters/postgresql/postgresql_exporter_test.go b/conduit/plugins/exporters/postgresql/postgresql_exporter_test.go similarity index 96% rename from exporters/postgresql/postgresql_exporter_test.go rename to conduit/plugins/exporters/postgresql/postgresql_exporter_test.go index 3b05ded57..e91729994 100644 --- a/exporters/postgresql/postgresql_exporter_test.go +++ b/conduit/plugins/exporters/postgresql/postgresql_exporter_test.go @@ -5,7 +5,6 @@ import ( "fmt" "testing" - "github.com/algorand/indexer/exporters" "github.com/sirupsen/logrus" "github.com/sirupsen/logrus/hooks/test" "github.com/stretchr/testify/assert" @@ -16,10 +15,12 @@ import ( "github.com/algorand/go-algorand/data/bookkeeping" "github.com/algorand/go-algorand/data/transactions" "github.com/algorand/go-algorand/ledger/ledgercore" + + "github.com/algorand/indexer/conduit/plugins" + "github.com/algorand/indexer/conduit/plugins/exporters" + "github.com/algorand/indexer/conduit/plugins/exporters/postgresql/util" "github.com/algorand/indexer/data" - "github.com/algorand/indexer/exporters/util" _ "github.com/algorand/indexer/idb/dummy" - "github.com/algorand/indexer/plugins" testutil "github.com/algorand/indexer/util/test" ) diff --git a/exporters/postgresql/sample.yaml b/conduit/plugins/exporters/postgresql/sample.yaml similarity index 100% rename from exporters/postgresql/sample.yaml rename to conduit/plugins/exporters/postgresql/sample.yaml diff --git a/exporters/util/prune.go b/conduit/plugins/exporters/postgresql/util/prune.go similarity index 100% rename from exporters/util/prune.go rename to conduit/plugins/exporters/postgresql/util/prune.go diff --git a/exporters/util/prune_test.go b/conduit/plugins/exporters/postgresql/util/prune_test.go similarity index 99% rename from exporters/util/prune_test.go rename to conduit/plugins/exporters/postgresql/util/prune_test.go index 4dfb455b7..9f909415f 100644 --- a/exporters/util/prune_test.go +++ b/conduit/plugins/exporters/postgresql/util/prune_test.go @@ -8,14 +8,15 @@ import ( "testing" "time" - "github.com/algorand/indexer/idb" - "github.com/algorand/indexer/idb/postgres" - pgtest "github.com/algorand/indexer/idb/postgres/testing" "github.com/jackc/pgx/v4" "github.com/jackc/pgx/v4/pgxpool" "github.com/sirupsen/logrus" "github.com/sirupsen/logrus/hooks/test" "github.com/stretchr/testify/assert" + + "github.com/algorand/indexer/idb" + "github.com/algorand/indexer/idb/postgres" + pgtest "github.com/algorand/indexer/idb/postgres/testing" ) var logger *logrus.Logger diff --git a/importers/algod/algod_importer.go b/conduit/plugins/importers/algod/algod_importer.go similarity index 97% rename from importers/algod/algod_importer.go rename to conduit/plugins/importers/algod/algod_importer.go index 9c184470a..408cea22f 100644 --- a/importers/algod/algod_importer.go +++ b/conduit/plugins/importers/algod/algod_importer.go @@ -17,9 +17,9 @@ import ( "github.com/algorand/go-algorand/rpcs" "github.com/algorand/indexer/conduit" + "github.com/algorand/indexer/conduit/plugins" + "github.com/algorand/indexer/conduit/plugins/importers" "github.com/algorand/indexer/data" - "github.com/algorand/indexer/importers" - "github.com/algorand/indexer/plugins" ) const importerName = "algod" diff --git a/importers/algod/algod_importer_config.go b/conduit/plugins/importers/algod/algod_importer_config.go similarity index 100% rename from importers/algod/algod_importer_config.go rename to conduit/plugins/importers/algod/algod_importer_config.go diff --git a/importers/algod/algod_importer_test.go b/conduit/plugins/importers/algod/algod_importer_test.go similarity index 97% rename from importers/algod/algod_importer_test.go rename to conduit/plugins/importers/algod/algod_importer_test.go index d5895e5e6..6a270b6bc 100644 --- a/importers/algod/algod_importer_test.go +++ b/conduit/plugins/importers/algod/algod_importer_test.go @@ -5,13 +5,13 @@ import ( "os" "testing" - "github.com/algorand/indexer/importers" - "github.com/algorand/indexer/plugins" - "github.com/algorand/indexer/util/test" - "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "gopkg.in/yaml.v3" + + "github.com/algorand/indexer/conduit/plugins" + "github.com/algorand/indexer/conduit/plugins/importers" + "github.com/algorand/indexer/util/test" ) var ( diff --git a/importers/algod/metrics.go b/conduit/plugins/importers/algod/metrics.go similarity index 100% rename from importers/algod/metrics.go rename to conduit/plugins/importers/algod/metrics.go diff --git a/importers/algod/sample.yaml b/conduit/plugins/importers/algod/sample.yaml similarity index 100% rename from importers/algod/sample.yaml rename to conduit/plugins/importers/algod/sample.yaml diff --git a/conduit/plugins/importers/all/all.go b/conduit/plugins/importers/all/all.go new file mode 100644 index 000000000..2704b613b --- /dev/null +++ b/conduit/plugins/importers/all/all.go @@ -0,0 +1,7 @@ +package all + +import ( + // Call package wide init function + _ "github.com/algorand/indexer/conduit/plugins/importers/algod" + _ "github.com/algorand/indexer/conduit/plugins/importers/filereader" +) diff --git a/importers/filereader/filereader.go b/conduit/plugins/importers/filereader/filereader.go similarity index 94% rename from importers/filereader/filereader.go rename to conduit/plugins/importers/filereader/filereader.go index a989388d3..eba530a14 100644 --- a/importers/filereader/filereader.go +++ b/conduit/plugins/importers/filereader/filereader.go @@ -15,10 +15,10 @@ import ( "github.com/algorand/go-algorand/data/bookkeeping" "github.com/algorand/indexer/conduit" + "github.com/algorand/indexer/conduit/plugins" + "github.com/algorand/indexer/conduit/plugins/exporters/filewriter" + "github.com/algorand/indexer/conduit/plugins/importers" "github.com/algorand/indexer/data" - "github.com/algorand/indexer/exporters/filewriter" - "github.com/algorand/indexer/importers" - "github.com/algorand/indexer/plugins" "github.com/algorand/indexer/util" ) diff --git a/importers/filereader/filereader_config.go b/conduit/plugins/importers/filereader/filereader_config.go similarity index 100% rename from importers/filereader/filereader_config.go rename to conduit/plugins/importers/filereader/filereader_config.go diff --git a/importers/filereader/filereader_test.go b/conduit/plugins/importers/filereader/filereader_test.go similarity index 96% rename from importers/filereader/filereader_test.go rename to conduit/plugins/importers/filereader/filereader_test.go index 4ba1d7a84..c11174470 100644 --- a/importers/filereader/filereader_test.go +++ b/conduit/plugins/importers/filereader/filereader_test.go @@ -18,10 +18,10 @@ import ( "github.com/algorand/go-algorand/data/transactions" "github.com/algorand/go-algorand/ledger/ledgercore" + "github.com/algorand/indexer/conduit/plugins" + "github.com/algorand/indexer/conduit/plugins/exporters/filewriter" + "github.com/algorand/indexer/conduit/plugins/importers" "github.com/algorand/indexer/data" - "github.com/algorand/indexer/exporters/filewriter" - "github.com/algorand/indexer/importers" - "github.com/algorand/indexer/plugins" "github.com/algorand/indexer/util" ) diff --git a/importers/filereader/sample.yaml b/conduit/plugins/importers/filereader/sample.yaml similarity index 100% rename from importers/filereader/sample.yaml rename to conduit/plugins/importers/filereader/sample.yaml diff --git a/importers/importer.go b/conduit/plugins/importers/importer.go similarity index 96% rename from importers/importer.go rename to conduit/plugins/importers/importer.go index f6023ae74..ba8030c94 100644 --- a/importers/importer.go +++ b/conduit/plugins/importers/importer.go @@ -2,11 +2,14 @@ package importers import ( "context" + + "github.com/sirupsen/logrus" + "github.com/algorand/go-algorand/data/bookkeeping" + "github.com/algorand/indexer/conduit" + "github.com/algorand/indexer/conduit/plugins" "github.com/algorand/indexer/data" - "github.com/algorand/indexer/plugins" - "github.com/sirupsen/logrus" ) // Importer defines the interface for importer plugins diff --git a/importers/importer_factory.go b/conduit/plugins/importers/importer_factory.go similarity index 100% rename from importers/importer_factory.go rename to conduit/plugins/importers/importer_factory.go diff --git a/plugins/metadata.go b/conduit/plugins/metadata.go similarity index 100% rename from plugins/metadata.go rename to conduit/plugins/metadata.go diff --git a/conduit/plugins/processors/all/all.go b/conduit/plugins/processors/all/all.go new file mode 100644 index 000000000..6b8158ff4 --- /dev/null +++ b/conduit/plugins/processors/all/all.go @@ -0,0 +1,8 @@ +package all + +import ( + // Call package wide init function + _ "github.com/algorand/indexer/conduit/plugins/processors/blockprocessor" + _ "github.com/algorand/indexer/conduit/plugins/processors/filterprocessor" + _ "github.com/algorand/indexer/conduit/plugins/processors/noop" +) diff --git a/processors/blockprocessor/block_processor.go b/conduit/plugins/processors/blockprocessor/block_processor.go similarity index 98% rename from processors/blockprocessor/block_processor.go rename to conduit/plugins/processors/blockprocessor/block_processor.go index 1cb24c668..66072a463 100644 --- a/processors/blockprocessor/block_processor.go +++ b/conduit/plugins/processors/blockprocessor/block_processor.go @@ -21,10 +21,10 @@ import ( "github.com/algorand/indexer/accounting" "github.com/algorand/indexer/conduit" + "github.com/algorand/indexer/conduit/plugins" + "github.com/algorand/indexer/conduit/plugins/processors" + indexerledger "github.com/algorand/indexer/conduit/plugins/processors/eval" "github.com/algorand/indexer/data" - "github.com/algorand/indexer/plugins" - "github.com/algorand/indexer/processors" - indexerledger "github.com/algorand/indexer/processors/eval" "github.com/algorand/indexer/util" ) diff --git a/processors/blockprocessor/block_processor_test.go b/conduit/plugins/processors/blockprocessor/block_processor_test.go similarity index 98% rename from processors/blockprocessor/block_processor_test.go rename to conduit/plugins/processors/blockprocessor/block_processor_test.go index 24d6f5a87..f1500b0e4 100644 --- a/processors/blockprocessor/block_processor_test.go +++ b/conduit/plugins/processors/blockprocessor/block_processor_test.go @@ -15,7 +15,7 @@ import ( "github.com/algorand/go-algorand/ledger/ledgercore" "github.com/algorand/go-algorand/rpcs" - "github.com/algorand/indexer/processors/blockprocessor" + "github.com/algorand/indexer/conduit/plugins/processors/blockprocessor" "github.com/algorand/indexer/util/test" ) diff --git a/processors/blockprocessor/config.go b/conduit/plugins/processors/blockprocessor/config.go similarity index 100% rename from processors/blockprocessor/config.go rename to conduit/plugins/processors/blockprocessor/config.go diff --git a/processors/blockprocessor/config_test.go b/conduit/plugins/processors/blockprocessor/config_test.go similarity index 99% rename from processors/blockprocessor/config_test.go rename to conduit/plugins/processors/blockprocessor/config_test.go index b0036770b..7d82cd07c 100644 --- a/processors/blockprocessor/config_test.go +++ b/conduit/plugins/processors/blockprocessor/config_test.go @@ -1,9 +1,10 @@ package blockprocessor import ( + "testing" + "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" - "testing" ) func TestConfigDeserialize(t *testing.T) { diff --git a/processors/blockprocessor/initialize.go b/conduit/plugins/processors/blockprocessor/initialize.go similarity index 98% rename from processors/blockprocessor/initialize.go rename to conduit/plugins/processors/blockprocessor/initialize.go index b5038eebc..c780e3282 100644 --- a/processors/blockprocessor/initialize.go +++ b/conduit/plugins/processors/blockprocessor/initialize.go @@ -12,8 +12,8 @@ import ( "github.com/algorand/go-algorand/ledger/ledgercore" "github.com/algorand/go-algorand/rpcs" + "github.com/algorand/indexer/conduit/plugins/processors/blockprocessor/internal" "github.com/algorand/indexer/fetcher" - "github.com/algorand/indexer/processors/blockprocessor/internal" ) // InitializeLedger will initialize a ledger to the directory given by the diff --git a/processors/blockprocessor/initialize_test.go b/conduit/plugins/processors/blockprocessor/initialize_test.go similarity index 97% rename from processors/blockprocessor/initialize_test.go rename to conduit/plugins/processors/blockprocessor/initialize_test.go index 40dfbf3de..244a18c6c 100644 --- a/processors/blockprocessor/initialize_test.go +++ b/conduit/plugins/processors/blockprocessor/initialize_test.go @@ -19,7 +19,7 @@ import ( "github.com/algorand/go-algorand/data/basics" "github.com/algorand/go-algorand/rpcs" - "github.com/algorand/indexer/processors/blockprocessor/internal" + "github.com/algorand/indexer/conduit/plugins/processors/blockprocessor/internal" "github.com/algorand/indexer/util" "github.com/algorand/indexer/util/test" ) diff --git a/processors/blockprocessor/internal/catchupservice.go b/conduit/plugins/processors/blockprocessor/internal/catchupservice.go similarity index 100% rename from processors/blockprocessor/internal/catchupservice.go rename to conduit/plugins/processors/blockprocessor/internal/catchupservice.go diff --git a/processors/blockprocessor/internal/catchupservice_test.go b/conduit/plugins/processors/blockprocessor/internal/catchupservice_test.go similarity index 100% rename from processors/blockprocessor/internal/catchupservice_test.go rename to conduit/plugins/processors/blockprocessor/internal/catchupservice_test.go diff --git a/processors/blockprocessor/metrics.go b/conduit/plugins/processors/blockprocessor/metrics.go similarity index 100% rename from processors/blockprocessor/metrics.go rename to conduit/plugins/processors/blockprocessor/metrics.go diff --git a/processors/blockprocessor/sample.yaml b/conduit/plugins/processors/blockprocessor/sample.yaml similarity index 100% rename from processors/blockprocessor/sample.yaml rename to conduit/plugins/processors/blockprocessor/sample.yaml diff --git a/processors/eval/ledger_for_evaluator.go b/conduit/plugins/processors/eval/ledger_for_evaluator.go similarity index 100% rename from processors/eval/ledger_for_evaluator.go rename to conduit/plugins/processors/eval/ledger_for_evaluator.go diff --git a/processors/eval/ledger_for_evaluator_test.go b/conduit/plugins/processors/eval/ledger_for_evaluator_test.go similarity index 99% rename from processors/eval/ledger_for_evaluator_test.go rename to conduit/plugins/processors/eval/ledger_for_evaluator_test.go index bdfc89f31..dc179d18e 100644 --- a/processors/eval/ledger_for_evaluator_test.go +++ b/conduit/plugins/processors/eval/ledger_for_evaluator_test.go @@ -17,8 +17,8 @@ import ( "github.com/algorand/go-algorand/ledger/ledgercore" "github.com/algorand/go-algorand/rpcs" - block_processor "github.com/algorand/indexer/processors/blockprocessor" - indxLedger "github.com/algorand/indexer/processors/eval" + block_processor "github.com/algorand/indexer/conduit/plugins/processors/blockprocessor" + indxLedger "github.com/algorand/indexer/conduit/plugins/processors/eval" "github.com/algorand/indexer/util/test" ) diff --git a/processors/filterprocessor/config.go b/conduit/plugins/processors/filterprocessor/config.go similarity index 87% rename from processors/filterprocessor/config.go rename to conduit/plugins/processors/filterprocessor/config.go index 63957d61a..1d6362c20 100644 --- a/processors/filterprocessor/config.go +++ b/conduit/plugins/processors/filterprocessor/config.go @@ -1,6 +1,8 @@ package filterprocessor -import "github.com/algorand/indexer/processors/filterprocessor/expression" +import ( + "github.com/algorand/indexer/conduit/plugins/processors/filterprocessor/expression" +) // SubConfig is the configuration needed for each additional filter type SubConfig struct { diff --git a/processors/filterprocessor/expression/expression.go b/conduit/plugins/processors/filterprocessor/expression/expression.go similarity index 100% rename from processors/filterprocessor/expression/expression.go rename to conduit/plugins/processors/filterprocessor/expression/expression.go diff --git a/processors/filterprocessor/expression/numerical_expressions.go b/conduit/plugins/processors/filterprocessor/expression/numerical_expressions.go similarity index 100% rename from processors/filterprocessor/expression/numerical_expressions.go rename to conduit/plugins/processors/filterprocessor/expression/numerical_expressions.go diff --git a/processors/filterprocessor/fields/filter.go b/conduit/plugins/processors/filterprocessor/fields/filter.go similarity index 100% rename from processors/filterprocessor/fields/filter.go rename to conduit/plugins/processors/filterprocessor/fields/filter.go diff --git a/processors/filterprocessor/fields/generated_signed_txn_map.go b/conduit/plugins/processors/filterprocessor/fields/generated_signed_txn_map.go similarity index 100% rename from processors/filterprocessor/fields/generated_signed_txn_map.go rename to conduit/plugins/processors/filterprocessor/fields/generated_signed_txn_map.go diff --git a/processors/filterprocessor/fields/searcher.go b/conduit/plugins/processors/filterprocessor/fields/searcher.go similarity index 96% rename from processors/filterprocessor/fields/searcher.go rename to conduit/plugins/processors/filterprocessor/fields/searcher.go index 917fa42f7..558eb8433 100644 --- a/processors/filterprocessor/fields/searcher.go +++ b/conduit/plugins/processors/filterprocessor/fields/searcher.go @@ -7,7 +7,8 @@ import ( "reflect" "github.com/algorand/go-algorand/data/transactions" - "github.com/algorand/indexer/processors/filterprocessor/expression" + + "github.com/algorand/indexer/conduit/plugins/processors/filterprocessor/expression" ) // Searcher searches the struct with an expression and method to call diff --git a/processors/filterprocessor/fields/searcher_test.go b/conduit/plugins/processors/filterprocessor/fields/searcher_test.go similarity index 97% rename from processors/filterprocessor/fields/searcher_test.go rename to conduit/plugins/processors/filterprocessor/fields/searcher_test.go index e801eec84..8f2035b66 100644 --- a/processors/filterprocessor/fields/searcher_test.go +++ b/conduit/plugins/processors/filterprocessor/fields/searcher_test.go @@ -8,7 +8,7 @@ import ( "github.com/algorand/go-algorand/data/basics" "github.com/algorand/go-algorand/data/transactions" - "github.com/algorand/indexer/processors/filterprocessor/expression" + "github.com/algorand/indexer/conduit/plugins/processors/filterprocessor/expression" ) // TestInternalSearch tests the internal search functionality diff --git a/processors/filterprocessor/filter_processor.go b/conduit/plugins/processors/filterprocessor/filter_processor.go similarity index 93% rename from processors/filterprocessor/filter_processor.go rename to conduit/plugins/processors/filterprocessor/filter_processor.go index 31318dab8..4b81fe08e 100644 --- a/processors/filterprocessor/filter_processor.go +++ b/conduit/plugins/processors/filterprocessor/filter_processor.go @@ -2,22 +2,21 @@ package filterprocessor import ( "context" - _ "embed" // used to embed config "fmt" "reflect" - "github.com/algorand/go-algorand/data/transactions" - log "github.com/sirupsen/logrus" "gopkg.in/yaml.v3" + "github.com/algorand/go-algorand/data/transactions" + "github.com/algorand/indexer/conduit" + "github.com/algorand/indexer/conduit/plugins" + "github.com/algorand/indexer/conduit/plugins/processors" + "github.com/algorand/indexer/conduit/plugins/processors/filterprocessor/expression" + "github.com/algorand/indexer/conduit/plugins/processors/filterprocessor/fields" "github.com/algorand/indexer/data" - "github.com/algorand/indexer/plugins" - "github.com/algorand/indexer/processors" - "github.com/algorand/indexer/processors/filterprocessor/expression" - "github.com/algorand/indexer/processors/filterprocessor/fields" ) const implementationName = "filter_processor" diff --git a/processors/filterprocessor/filter_processor_test.go b/conduit/plugins/processors/filterprocessor/filter_processor_test.go similarity index 99% rename from processors/filterprocessor/filter_processor_test.go rename to conduit/plugins/processors/filterprocessor/filter_processor_test.go index 9bde1af5e..1cbacd25e 100644 --- a/processors/filterprocessor/filter_processor_test.go +++ b/conduit/plugins/processors/filterprocessor/filter_processor_test.go @@ -9,10 +9,11 @@ import ( "github.com/algorand/go-algorand/data/basics" "github.com/algorand/go-algorand/data/transactions" + "github.com/algorand/indexer/conduit" + "github.com/algorand/indexer/conduit/plugins" + "github.com/algorand/indexer/conduit/plugins/processors" "github.com/algorand/indexer/data" - "github.com/algorand/indexer/plugins" - "github.com/algorand/indexer/processors" ) // TestFilterProcessor_Init_None diff --git a/processors/filterprocessor/gen/generate.go b/conduit/plugins/processors/filterprocessor/gen/generate.go similarity index 100% rename from processors/filterprocessor/gen/generate.go rename to conduit/plugins/processors/filterprocessor/gen/generate.go diff --git a/processors/filterprocessor/sample.yaml b/conduit/plugins/processors/filterprocessor/sample.yaml similarity index 100% rename from processors/filterprocessor/sample.yaml rename to conduit/plugins/processors/filterprocessor/sample.yaml diff --git a/processors/filterprocessor/sample_test.go b/conduit/plugins/processors/filterprocessor/sample_test.go similarity index 91% rename from processors/filterprocessor/sample_test.go rename to conduit/plugins/processors/filterprocessor/sample_test.go index 82ab80301..f58f274e8 100644 --- a/processors/filterprocessor/sample_test.go +++ b/conduit/plugins/processors/filterprocessor/sample_test.go @@ -11,8 +11,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/algorand/indexer/conduit" - "github.com/algorand/indexer/plugins" - "github.com/algorand/indexer/processors" + "github.com/algorand/indexer/conduit/plugins" + "github.com/algorand/indexer/conduit/plugins/processors" ) // TestFilterProcessorSampleConfigInit validates that all fields in the sample config are valid for a filter processor diff --git a/processors/noop/noop_processor.go b/conduit/plugins/processors/noop/noop_processor.go similarity index 91% rename from processors/noop/noop_processor.go rename to conduit/plugins/processors/noop/noop_processor.go index 67dedb74d..375402d17 100644 --- a/processors/noop/noop_processor.go +++ b/conduit/plugins/processors/noop/noop_processor.go @@ -7,9 +7,9 @@ import ( "github.com/sirupsen/logrus" "github.com/algorand/indexer/conduit" + "github.com/algorand/indexer/conduit/plugins" + "github.com/algorand/indexer/conduit/plugins/processors" "github.com/algorand/indexer/data" - "github.com/algorand/indexer/plugins" - "github.com/algorand/indexer/processors" ) const implementationName = "noop" diff --git a/processors/noop/sample.yaml b/conduit/plugins/processors/noop/sample.yaml similarity index 100% rename from processors/noop/sample.yaml rename to conduit/plugins/processors/noop/sample.yaml diff --git a/processors/processor.go b/conduit/plugins/processors/processor.go similarity index 96% rename from processors/processor.go rename to conduit/plugins/processors/processor.go index dbe27bec9..75c1a8295 100644 --- a/processors/processor.go +++ b/conduit/plugins/processors/processor.go @@ -6,8 +6,8 @@ import ( "github.com/sirupsen/logrus" "github.com/algorand/indexer/conduit" + "github.com/algorand/indexer/conduit/plugins" "github.com/algorand/indexer/data" - "github.com/algorand/indexer/plugins" ) // Processor an interface that defines an object that can filter and process transactions diff --git a/processors/processor_factory.go b/conduit/plugins/processors/processor_factory.go similarity index 100% rename from processors/processor_factory.go rename to conduit/plugins/processors/processor_factory.go diff --git a/processors/processor_factory_test.go b/conduit/plugins/processors/processor_factory_test.go similarity index 100% rename from processors/processor_factory_test.go rename to conduit/plugins/processors/processor_factory_test.go diff --git a/docs/Conduit.md b/docs/Conduit.md index 757b87d10..1d252c0e6 100644 --- a/docs/Conduit.md +++ b/docs/Conduit.md @@ -36,7 +36,7 @@ See the [Development](conduit/Development.md) page for building a plugin. # Features # Plugin System -A Conduit pipeline is composed of 3 components, [Importers](../importers/README.md), [Processors](../processors/README.md), and [Exporters](../exporters/README.md). +A Conduit pipeline is composed of 3 components, [Importers](../conduit/plugins/importers/README.md), [Processors](../conduit/plugins/processors/README.md), and [Exporters](../conduit/plugins/exporters/README.md). Every pipeline must define exactly 1 Importer, 1 Exporter, and can optionally define a series of 0 or more Processors. The original Algorand Indexer has been defined as a Conduit pipeline via the [algorand-indexer](../cmd/algorand-indexer/daemon.go) executable, see [Migrating from Indexer](#migrating-from-indexer) diff --git a/exporters/all/all.go b/exporters/all/all.go deleted file mode 100644 index 0aa993be8..000000000 --- a/exporters/all/all.go +++ /dev/null @@ -1,8 +0,0 @@ -package all - -import ( - // Call package wide init function - _ "github.com/algorand/indexer/exporters/filewriter" - _ "github.com/algorand/indexer/exporters/noop" - _ "github.com/algorand/indexer/exporters/postgresql" -) diff --git a/idb/postgres/postgres_integration_common_test.go b/idb/postgres/postgres_integration_common_test.go index bc5f52832..4e9b09d16 100644 --- a/idb/postgres/postgres_integration_common_test.go +++ b/idb/postgres/postgres_integration_common_test.go @@ -2,18 +2,18 @@ package postgres import ( "context" - "github.com/algorand/go-algorand/rpcs" "testing" + "github.com/jackc/pgx/v4/pgxpool" test2 "github.com/sirupsen/logrus/hooks/test" + "github.com/stretchr/testify/require" "github.com/algorand/go-algorand/data/bookkeeping" "github.com/algorand/go-algorand/ledger" - "github.com/algorand/indexer/processors/blockprocessor" + "github.com/algorand/go-algorand/rpcs" "github.com/algorand/indexer/util/test" - "github.com/jackc/pgx/v4/pgxpool" - "github.com/stretchr/testify/require" + "github.com/algorand/indexer/conduit/plugins/processors/blockprocessor" "github.com/algorand/indexer/idb" pgtest "github.com/algorand/indexer/idb/postgres/internal/testing" ) diff --git a/idb/postgres/postgres_integration_test.go b/idb/postgres/postgres_integration_test.go index d6d6e681f..250ca802e 100644 --- a/idb/postgres/postgres_integration_test.go +++ b/idb/postgres/postgres_integration_test.go @@ -24,13 +24,13 @@ import ( "github.com/algorand/go-codec/codec" "github.com/algorand/indexer/api/generated/v2" + "github.com/algorand/indexer/conduit/plugins/processors/blockprocessor" "github.com/algorand/indexer/idb" "github.com/algorand/indexer/idb/postgres/internal/encoding" "github.com/algorand/indexer/idb/postgres/internal/schema" pgtest "github.com/algorand/indexer/idb/postgres/internal/testing" pgutil "github.com/algorand/indexer/idb/postgres/internal/util" "github.com/algorand/indexer/importer" - "github.com/algorand/indexer/processors/blockprocessor" "github.com/algorand/indexer/util" "github.com/algorand/indexer/util/test" ) diff --git a/importer/helper.go b/importer/helper.go index 7f22522cd..b5aa9cb5f 100644 --- a/importer/helper.go +++ b/importer/helper.go @@ -20,7 +20,7 @@ import ( "github.com/algorand/go-algorand/data/bookkeeping" "github.com/algorand/go-algorand/protocol" "github.com/algorand/go-algorand/rpcs" - "github.com/algorand/indexer/processors/blockprocessor" + "github.com/algorand/indexer/conduit/plugins/processors/blockprocessor" "github.com/algorand/indexer/util" log "github.com/sirupsen/logrus" diff --git a/importers/all/all.go b/importers/all/all.go deleted file mode 100644 index e29fc2f8a..000000000 --- a/importers/all/all.go +++ /dev/null @@ -1,7 +0,0 @@ -package all - -import ( - // Call package wide init function - _ "github.com/algorand/indexer/importers/algod" - _ "github.com/algorand/indexer/importers/filereader" -) diff --git a/processors/all/all.go b/processors/all/all.go deleted file mode 100644 index 495ce5228..000000000 --- a/processors/all/all.go +++ /dev/null @@ -1,8 +0,0 @@ -package all - -import ( - // Call package wide init function - _ "github.com/algorand/indexer/processors/blockprocessor" - _ "github.com/algorand/indexer/processors/filterprocessor" - _ "github.com/algorand/indexer/processors/noop" -)