diff --git a/arc_cache.go b/arc_cache.go index e25dd50965ff6e48d3f458440d265c58d962a244..98a309d7f580a4015a7d9fe3eec44d4cab40115d 100644 --- a/arc_cache.go +++ b/arc_cache.go @@ -4,9 +4,9 @@ import ( "context" lru "github.com/hashicorp/golang-lru" - blocks "gitlab.dms3.io/dms3/public/go-block-format" - cid "gitlab.dms3.io/dms3/public/go-cid" - metrics "gitlab.dms3.io/dms3/public/go-metrics-interface" + blocks "gitlab.dms3.io/dms3/go-block-format" + cid "gitlab.dms3.io/dms3/go-cid" + metrics "gitlab.dms3.io/dms3/go-metrics-interface" ) type cacheHave bool diff --git a/arc_cache_test.go b/arc_cache_test.go index cdf0f46a64703cb9b65148b1f6eaeaf191da0d34..f90619ee1456a5005a4c0d39df246fa563bcc0e7 100644 --- a/arc_cache_test.go +++ b/arc_cache_test.go @@ -4,10 +4,10 @@ import ( "context" "testing" - blocks "gitlab.dms3.io/dms3/public/go-block-format" - cid "gitlab.dms3.io/dms3/public/go-cid" - ds "gitlab.dms3.io/dms3/public/go-datastore" - syncds "gitlab.dms3.io/dms3/public/go-datastore/sync" + blocks "gitlab.dms3.io/dms3/go-block-format" + cid "gitlab.dms3.io/dms3/go-cid" + ds "gitlab.dms3.io/dms3/go-datastore" + syncds "gitlab.dms3.io/dms3/go-datastore/sync" ) var exampleBlock = blocks.NewBlock([]byte("foo")) diff --git a/blockstore.go b/blockstore.go index ad353edf88069914b3cf25c76971efa16850664a..adbc38f873233f6fa694d59df0d3190597859535 100644 --- a/blockstore.go +++ b/blockstore.go @@ -8,13 +8,13 @@ import ( "sync" "sync/atomic" - blocks "gitlab.dms3.io/dms3/public/go-block-format" - cid "gitlab.dms3.io/dms3/public/go-cid" - ds "gitlab.dms3.io/dms3/public/go-datastore" - dsns "gitlab.dms3.io/dms3/public/go-datastore/namespace" - dsq "gitlab.dms3.io/dms3/public/go-datastore/query" - dshelp "gitlab.dms3.io/dms3/public/go-dms3-ds-help" - logging "gitlab.dms3.io/dms3/public/go-log" + blocks "gitlab.dms3.io/dms3/go-block-format" + cid "gitlab.dms3.io/dms3/go-cid" + ds "gitlab.dms3.io/dms3/go-datastore" + dsns "gitlab.dms3.io/dms3/go-datastore/namespace" + dsq "gitlab.dms3.io/dms3/go-datastore/query" + dshelp "gitlab.dms3.io/dms3/go-dms3-ds-help" + logging "gitlab.dms3.io/dms3/go-log" uatomic "go.uber.org/atomic" ) diff --git a/blockstore_test.go b/blockstore_test.go index 8fef6ba9cf649a6d5a6c85e75863d2a3eb5a1894..4dd7ff25bd2aa8d26d5e5b9b4a3e851a97f3fea2 100644 --- a/blockstore_test.go +++ b/blockstore_test.go @@ -6,12 +6,12 @@ import ( "fmt" "testing" - blocks "gitlab.dms3.io/dms3/public/go-block-format" - cid "gitlab.dms3.io/dms3/public/go-cid" - ds "gitlab.dms3.io/dms3/public/go-datastore" - dsq "gitlab.dms3.io/dms3/public/go-datastore/query" - ds_sync "gitlab.dms3.io/dms3/public/go-datastore/sync" - u "gitlab.dms3.io/dms3/public/go-dms3-util" + blocks "gitlab.dms3.io/dms3/go-block-format" + cid "gitlab.dms3.io/dms3/go-cid" + ds "gitlab.dms3.io/dms3/go-datastore" + dsq "gitlab.dms3.io/dms3/go-datastore/query" + ds_sync "gitlab.dms3.io/dms3/go-datastore/sync" + u "gitlab.dms3.io/dms3/go-dms3-util" ) func TestGetWhenKeyNotPresent(t *testing.T) { @@ -118,7 +118,7 @@ func TestPutUsesHas(t *testing.T) { // Some datastores rely on the implementation detail that Put checks Has // first, to avoid overriding existing objects' metadata. This test ensures // that Blockstore continues to behave this way. - // Please ping https://gitlab.dms3.io/dms3/public/go-dms3-blockstore/pull/47 if this + // Please ping https://gitlab.dms3.io/dms3/go-dms3-blockstore/pull/47 if this // behavior is being removed. ds := &countHasDS{ Datastore: ds.NewMapDatastore(), diff --git a/bloom_cache.go b/bloom_cache.go index 1702e34bb6e16080570ea90e1aa22f9de4cecaac..f4367afde072db46e777464b862638b293a7579d 100644 --- a/bloom_cache.go +++ b/bloom_cache.go @@ -6,10 +6,10 @@ import ( "sync/atomic" "time" - bloom "gitlab.dms3.io/dms3/public/bbloom" - blocks "gitlab.dms3.io/dms3/public/go-block-format" - cid "gitlab.dms3.io/dms3/public/go-cid" - metrics "gitlab.dms3.io/dms3/public/go-metrics-interface" + bloom "gitlab.dms3.io/dms3/bbloom" + blocks "gitlab.dms3.io/dms3/go-block-format" + cid "gitlab.dms3.io/dms3/go-cid" + metrics "gitlab.dms3.io/dms3/go-metrics-interface" ) // bloomCached returns a Blockstore that caches Has requests using a Bloom diff --git a/bloom_cache_test.go b/bloom_cache_test.go index a64dc402cb496f67f91c0755758d6bf1afb0ae8e..2e536b98b483aa922fd927670e4df4d564fffc1f 100644 --- a/bloom_cache_test.go +++ b/bloom_cache_test.go @@ -7,10 +7,10 @@ import ( "testing" "time" - blocks "gitlab.dms3.io/dms3/public/go-block-format" - ds "gitlab.dms3.io/dms3/public/go-datastore" - dsq "gitlab.dms3.io/dms3/public/go-datastore/query" - syncds "gitlab.dms3.io/dms3/public/go-datastore/sync" + blocks "gitlab.dms3.io/dms3/go-block-format" + ds "gitlab.dms3.io/dms3/go-datastore" + dsq "gitlab.dms3.io/dms3/go-datastore/query" + syncds "gitlab.dms3.io/dms3/go-datastore/sync" ) func testBloomCached(ctx context.Context, bs Blockstore) (*bloomcache, error) { diff --git a/caching.go b/caching.go index 86f050377e6edb52a46a68480828e3218e6445f6..0c5d67df3836c972053c48b057a820c786d7803d 100644 --- a/caching.go +++ b/caching.go @@ -4,7 +4,7 @@ import ( "context" "errors" - metrics "gitlab.dms3.io/dms3/public/go-metrics-interface" + metrics "gitlab.dms3.io/dms3/go-metrics-interface" ) // CacheOpts wraps options for CachedBlockStore(). diff --git a/go.mod b/go.mod index fc56085d7c2094271c9a0209b5e91c6e88fae51d..e3d6ee4488379a5552ddbad3c49418cbec94d3a2 100644 --- a/go.mod +++ b/go.mod @@ -1,16 +1,16 @@ -module gitlab.dms3.io/dms3/public/go-dms3-blockstore +module gitlab.dms3.io/dms3/go-dms3-blockstore require ( github.com/hashicorp/golang-lru v0.5.4 github.com/multiformats/go-multihash v0.0.14 - gitlab.dms3.io/dms3/public/bbloom v0.0.1 - gitlab.dms3.io/dms3/public/go-block-format v0.0.1 - gitlab.dms3.io/dms3/public/go-cid v0.0.1 - gitlab.dms3.io/dms3/public/go-datastore v0.0.1 - gitlab.dms3.io/dms3/public/go-dms3-ds-help v0.0.2 - gitlab.dms3.io/dms3/public/go-dms3-util v0.0.1 - gitlab.dms3.io/dms3/public/go-log v0.0.1 - gitlab.dms3.io/dms3/public/go-metrics-interface v0.0.1 + gitlab.dms3.io/dms3/bbloom v0.0.2 + gitlab.dms3.io/dms3/go-block-format v0.0.3 + gitlab.dms3.io/dms3/go-cid v0.0.3 + gitlab.dms3.io/dms3/go-datastore v0.0.2 + gitlab.dms3.io/dms3/go-dms3-ds-help v0.0.3 + gitlab.dms3.io/dms3/go-dms3-util v0.0.2 + gitlab.dms3.io/dms3/go-log v0.0.2 + gitlab.dms3.io/dms3/go-metrics-interface v0.0.2 go.uber.org/atomic v1.7.0 ) diff --git a/go.sum b/go.sum index 1a6bd03365baf97f4fc12cee4cb653dc294b9130..2133269e61906fc07dbf81cce3b6f8d79b24cc92 100644 --- a/go.sum +++ b/go.sum @@ -54,23 +54,23 @@ github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0 github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -gitlab.dms3.io/dms3/public/bbloom v0.0.1 h1:kgk1gfIoUl7cuxlYZ0/Mv8k01xikBH33fb2peWIQJic= -gitlab.dms3.io/dms3/public/bbloom v0.0.1/go.mod h1:n76ooRIrdCEsVmkoqml73ZuX1kVWNstRTPpoz4YyMzQ= -gitlab.dms3.io/dms3/public/go-block-format v0.0.1 h1:PQ6+E7zY6kUIHET86uJTQHTTj4Z9ZNfP7w281ZdExgk= -gitlab.dms3.io/dms3/public/go-block-format v0.0.1/go.mod h1:xlvtW/OF72rOzLa2RVWXX2Uw18qTAWTQEs/Xp7SCnuY= -gitlab.dms3.io/dms3/public/go-cid v0.0.1 h1:qs4dtkDigcLGY/58dIZaFjKLt+orrTcmTBvtqaM3570= -gitlab.dms3.io/dms3/public/go-cid v0.0.1/go.mod h1:GQw3gc4CSrFY+aX6M+OBQDlg0p5/eQJoRrayaZzkAOQ= -gitlab.dms3.io/dms3/public/go-datastore v0.0.1 h1:RjZLvnqlvWDpb5ZwvkVEWGONF7zKNPe4Q0DND5oxZec= -gitlab.dms3.io/dms3/public/go-datastore v0.0.1/go.mod h1:qSI0hpmVMo6HCp0uveHTKyQ87j1aVe2hqiTeiPCehYA= -gitlab.dms3.io/dms3/public/go-dms3-delay v0.0.1/go.mod h1:Mg+buHOoh8UruN+MMqeqBUPBKMRTmpsXAyxv5ZSt+X4= -gitlab.dms3.io/dms3/public/go-dms3-ds-help v0.0.2 h1:SYgjiHzcpFBgabZhLVdfC4LPKjcQ/Lc8xgh3c3JsoFs= -gitlab.dms3.io/dms3/public/go-dms3-ds-help v0.0.2/go.mod h1:szc3LU0qkzM55gKHJuGx2TU6tIn/4sRJt/ThZzffi9A= -gitlab.dms3.io/dms3/public/go-dms3-util v0.0.1 h1:Gd+kJl1Rc+ZEUb9CIS1ZctQnF9G1oruNFyxUC//QBUQ= -gitlab.dms3.io/dms3/public/go-dms3-util v0.0.1/go.mod h1:ymlwtzTNMq8Ug+gVtPAMxXKCKTXwXJAzXS+SUihfKgo= -gitlab.dms3.io/dms3/public/go-log v0.0.1 h1:jqz2g8pVdPW+Sy8CCo4rYfGEjktGhCBfgIb3oeY6yx8= -gitlab.dms3.io/dms3/public/go-log v0.0.1/go.mod h1:OsyF7lVYe47r03v1ZCbrmz0byeGUWB0Y219jN1DJx3s= -gitlab.dms3.io/dms3/public/go-metrics-interface v0.0.1 h1:oLJzd5zSjf5C1aEMHziNbV4RbJVuPaNzzKW4VBzKnQM= -gitlab.dms3.io/dms3/public/go-metrics-interface v0.0.1/go.mod h1:Ag1ayfnHxy0H659akn+bjAGn9k/HJrpxsVrB90DmRL8= +gitlab.dms3.io/dms3/bbloom v0.0.2 h1:QUy22f3j+xsQm4osUxvE5xoJ2N9gW7qU59RQx9CKcyY= +gitlab.dms3.io/dms3/bbloom v0.0.2/go.mod h1:LcQmLQuryIw3kDzD+bcbojAojWtYni30BeSJ9wuw8qg= +gitlab.dms3.io/dms3/go-block-format v0.0.3 h1:3gPZUNu5UavbZxbMNd4NDTLG53O7MbmYSwntQwZGKxI= +gitlab.dms3.io/dms3/go-block-format v0.0.3/go.mod h1:IbZAFf3fFJa8YW98gaSg/iO9GKtsgVs6+N8OVHmFw1I= +gitlab.dms3.io/dms3/go-cid v0.0.3 h1:5qZ1sl1Bi26naLz7Vsc8fjWcJKX8bR6njt3WPCteXac= +gitlab.dms3.io/dms3/go-cid v0.0.3/go.mod h1:qT/Q1NZD31UnWQ+rwsQgzGrrsQhpq7dYSlXf7ulDgtk= +gitlab.dms3.io/dms3/go-datastore v0.0.2 h1:cLsmDEiDz+onFnbPhyLYuPECw+tJEnvpil958ps0WHw= +gitlab.dms3.io/dms3/go-datastore v0.0.2/go.mod h1:IOybd0feVxRiGt5idG/FzjdeK6itS0uaMgD42CmANFo= +gitlab.dms3.io/dms3/go-dms3-delay v0.0.2/go.mod h1:WPBu+WALc2GAYE3KfI5QM+r3dX9gv7wHJVfTFlYBwDg= +gitlab.dms3.io/dms3/go-dms3-ds-help v0.0.3 h1:uSvksVjFcrItUWet55Lokpe5hez+zp4UE6aXeAZp73A= +gitlab.dms3.io/dms3/go-dms3-ds-help v0.0.3/go.mod h1:mobOVtN8rkzaq3ZY/JSnaZxSL0A2N6gQlyGuAk9e6ug= +gitlab.dms3.io/dms3/go-dms3-util v0.0.2 h1:xXHeLaht5szd3QPdQp5KcfmXbIyRvRPSdQnMkJPRgPo= +gitlab.dms3.io/dms3/go-dms3-util v0.0.2/go.mod h1:5hPwxzo5zK4NeHE/anWIQGHcIoG7aTl9/Pp0j2zg0l8= +gitlab.dms3.io/dms3/go-log v0.0.2 h1:vuNG5qmx6P9iK+A1+k4AmC6Q+ORm2ekWaQVbMmeL2wc= +gitlab.dms3.io/dms3/go-log v0.0.2/go.mod h1:iLuW2zqJJaP1WdbME4P6AS9AIMovwGDAn3zV/riR5iE= +gitlab.dms3.io/dms3/go-metrics-interface v0.0.2 h1:ne/5rq39etdUVBeSl80e/BM6U8dLSzB/nMvSoZ6woXM= +gitlab.dms3.io/dms3/go-metrics-interface v0.0.2/go.mod h1:7A1hwAuYHn/sPzRzK2bF/yJwwyH85pqC9q09ezOCzgE= go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= @@ -85,6 +85,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 h1:1wopBVtVdWnn03fZelqdXTqk7U7zPQCb+T4rbU9ZEoU= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -97,6 +99,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210608053332-aa57babbf139 h1:C+AwYEtBp/VQwoLntUmQ/yx3MS9vmZaKNdw5eOpoQe8= +golang.org/x/sys v0.0.0-20210608053332-aa57babbf139/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= diff --git a/idstore.go b/idstore.go index 083c32ba6ed06d7ad422bead0bd7074424e9a563..514ecb24280ba19197e9fb4aa76fdeda7f891308 100644 --- a/idstore.go +++ b/idstore.go @@ -5,8 +5,8 @@ import ( "io" mh "github.com/multiformats/go-multihash" - blocks "gitlab.dms3.io/dms3/public/go-block-format" - cid "gitlab.dms3.io/dms3/public/go-cid" + blocks "gitlab.dms3.io/dms3/go-block-format" + cid "gitlab.dms3.io/dms3/go-cid" ) // idstore wraps a BlockStore to add support for identity hashes diff --git a/idstore_test.go b/idstore_test.go index b965ef818fb5178be5542ab05a1c021e5d8715ae..2dc0fe43a0c59d1c7a5d55e4d5618e53b4fd12dc 100644 --- a/idstore_test.go +++ b/idstore_test.go @@ -5,9 +5,9 @@ import ( "testing" mh "github.com/multiformats/go-multihash" - blk "gitlab.dms3.io/dms3/public/go-block-format" - cid "gitlab.dms3.io/dms3/public/go-cid" - ds "gitlab.dms3.io/dms3/public/go-datastore" + blk "gitlab.dms3.io/dms3/go-block-format" + cid "gitlab.dms3.io/dms3/go-cid" + ds "gitlab.dms3.io/dms3/go-datastore" ) func createTestStores() (Blockstore, *callbackDatastore) {