Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3-routing
Commits
40e5b433
Commit
40e5b433
authored
Jul 11, 2021
by
tavit ohanian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial port
parent
49d401a6
Pipeline
#738
failed with stages
in 8 seconds
Changes
10
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
241 additions
and
120 deletions
+241
-120
.gitlab-ci.yml
.gitlab-ci.yml
+35
-0
go.mod
go.mod
+15
-13
go.sum
go.sum
+153
-69
mock/centralized_client.go
mock/centralized_client.go
+5
-5
mock/centralized_server.go
mock/centralized_server.go
+6
-6
mock/centralized_test.go
mock/centralized_test.go
+5
-5
mock/interface.go
mock/interface.go
+5
-5
none/none_client.go
none/none_client.go
+6
-6
offline/offline.go
offline/offline.go
+7
-7
offline/offline_test.go
offline/offline_test.go
+4
-4
No files found.
.gitlab-ci.yml
0 → 100644
View file @
40e5b433
stages
:
-
build
-
test
variables
:
BUILD_DIR
:
"
/tmp/$CI_CONCURRENT_PROJECT_ID"
before_script
:
-
mkdir -p $BUILD_DIR/src
-
cd $BUILD_DIR/src
-
if [ -d $CI_PROJECT_DIR ]
-
then
-
echo "soft link $CI_PROJECT_DIR exists"
-
else
-
echo "creating soft link $CI_PROJECT_DIR"
-
ln -s $CI_PROJECT_DIR
-
fi
-
cd $CI_PROJECT_DIR
build
:
stage
:
build
tags
:
-
testing
script
:
-
echo $CI_JOB_STAGE
-
go build
test
:
stage
:
test
tags
:
-
testing
script
:
-
echo $CI_JOB_STAGE
-
go test -cover
coverage
:
'
/coverage:
\d+.\d+%
of
statements/'
go.mod
View file @
40e5b433
module
github.com/ipfs/go-ipfs-routing
module
gitlab.dms3.io/dms3/public/go-dms3-routing
go 1.15
require (
github.com/gogo/protobuf
v1.
2
.1
github.com/
ipfs/go-cid
v0.
0.2
github.com/
ipfs/go-datastore
v0.0.1
git
hub.com/ipfs/go-ipfs-delay
v0.0.1
git
hub.com/ipfs/go-ipfs-ds-help
v0.0.1
git
hub.com/ipfs/go-ipfs-util
v0.0.1
git
hub.com/ipfs/go-log
v0.0.
1
git
hub.com/libp2p/go-libp2p-core
v0.0.
2
git
hub.com/libp2p/go-libp2p-record
v0.
1.0
git
hub.com/lib
p2p/go-
lib
p2p-
testing
v0.0.
3
git
hub.com/multiformats/go-multiaddr
v0.0.
4
git
hub.com/multiformats/go-multihash
v0.0.
5
github.com/gogo/protobuf
v1.
3
.1
github.com/
multiformats/go-multiaddr
v0.
3.1
github.com/
multiformats/go-multihash
v0.0.1
4
git
lab.dms3.io/dms3/public/go-cid
v0.0.1
git
lab.dms3.io/dms3/public/go-datastore
v0.0.1
git
lab.dms3.io/dms3/public/go-dms3-delay
v0.0.1
git
lab.dms3.io/dms3/public/go-dms3-ds-help
v0.0.
2
git
lab.dms3.io/dms3/public/go-dms3-util
v0.0.
1
git
lab.dms3.io/dms3/public/go-log
v0.
0.1
git
lab.dms3.io/
p2p/go-p2p-
core
v0.0.
1
git
lab.dms3.io/p2p/go-p2p-record
v0.0.
1
git
lab.dms3.io/p2p/go-p2p-testing
v0.0.
1
)
go.sum
View file @
40e5b433
This diff is collapsed.
Click to expand it.
mock/centralized_client.go
View file @
40e5b433
...
...
@@ -4,12 +4,12 @@ import (
"context"
"time"
cid
"git
hub.com/ipfs
/go-cid"
logging
"git
hub.com/ipfs
/go-log"
cid
"git
lab.dms3.io/dms3/public
/go-cid"
logging
"git
lab.dms3.io/dms3/public
/go-log"
"git
hub.com/lib
p2p/go-
lib
p2p-core/peer"
"git
hub.com/lib
p2p/go-
lib
p2p-core/routing"
"github.com/lib
p2p/go-
lib
p2p-testing/net"
"git
lab.dms3.io/
p2p/go-p2p-core/peer"
"git
lab.dms3.io/
p2p/go-p2p-core/routing"
tnet
"gitlab.dms3.io/
p2p/go-p2p-testing/net"
ma
"github.com/multiformats/go-multiaddr"
)
...
...
mock/centralized_server.go
View file @
40e5b433
...
...
@@ -6,14 +6,14 @@ import (
"sync"
"time"
cid
"git
hub.com/ipfs
/go-cid"
ds
"git
hub.com/ipfs
/go-datastore"
dssync
"git
hub.com/ipfs
/go-datastore/sync"
cid
"git
lab.dms3.io/dms3/public
/go-cid"
ds
"git
lab.dms3.io/dms3/public
/go-datastore"
dssync
"git
lab.dms3.io/dms3/public
/go-datastore/sync"
"git
hub.com/lib
p2p/go-
lib
p2p-core/peer"
"github.com/lib
p2p/go-
lib
p2p-testing/net"
"git
lab.dms3.io/
p2p/go-p2p-core/peer"
tnet
"gitlab.dms3.io/
p2p/go-p2p-testing/net"
offline
"git
hub.com/ipfs/go-ipfs
-routing/offline"
offline
"git
lab.dms3.io/dms3/public/go-dms3
-routing/offline"
)
// server is the mockrouting.Client's private interface to the routing server
...
...
mock/centralized_test.go
View file @
40e5b433
...
...
@@ -5,12 +5,12 @@ import (
"testing"
"time"
cid
"git
hub.com/ipfs
/go-cid"
delay
"git
hub.com/ipfs/go-ipfs
-delay"
u
"git
hub.com/ipfs/go-ipfs
-util"
cid
"git
lab.dms3.io/dms3/public
/go-cid"
delay
"git
lab.dms3.io/dms3/public/go-dms3
-delay"
u
"git
lab.dms3.io/dms3/public/go-dms3
-util"
"git
hub.com/lib
p2p/go-
lib
p2p-core/peer"
"github.com/lib
p2p/go-
lib
p2p-testing/net"
"git
lab.dms3.io/
p2p/go-p2p-core/peer"
tnet
"gitlab.dms3.io/
p2p/go-p2p-testing/net"
)
func
TestKeyNotFound
(
t
*
testing
.
T
)
{
...
...
mock/interface.go
View file @
40e5b433
...
...
@@ -7,12 +7,12 @@ package mockrouting
import
(
"context"
ds
"git
hub.com/ipfs
/go-datastore"
delay
"git
hub.com/ipfs/go-ipfs
-delay"
ds
"git
lab.dms3.io/dms3/public
/go-datastore"
delay
"git
lab.dms3.io/dms3/public/go-dms3
-delay"
"git
hub.com/lib
p2p/go-
lib
p2p-core/peer"
"git
hub.com/lib
p2p/go-
lib
p2p-core/routing"
"github.com/lib
p2p/go-
lib
p2p-testing/net"
"git
lab.dms3.io/
p2p/go-p2p-core/peer"
"git
lab.dms3.io/
p2p/go-p2p-core/routing"
tnet
"gitlab.dms3.io/
p2p/go-p2p-testing/net"
)
// MockValidator is a record validator that always returns success.
...
...
none/none_client.go
View file @
40e5b433
...
...
@@ -5,14 +5,14 @@ import (
"context"
"errors"
cid
"git
hub.com/ipfs
/go-cid"
ds
"git
hub.com/ipfs
/go-datastore"
cid
"git
lab.dms3.io/dms3/public
/go-cid"
ds
"git
lab.dms3.io/dms3/public
/go-datastore"
"git
hub.com/lib
p2p/go-
lib
p2p-core/host"
"git
hub.com/lib
p2p/go-
lib
p2p-core/peer"
"git
hub.com/lib
p2p/go-
lib
p2p-core/routing"
"git
lab.dms3.io/
p2p/go-p2p-core/host"
"git
lab.dms3.io/
p2p/go-p2p-core/peer"
"git
lab.dms3.io/
p2p/go-p2p-core/routing"
record
"git
hub.com/lib
p2p/go-
lib
p2p-record"
record
"git
lab.dms3.io/
p2p/go-p2p-record"
)
type
nilclient
struct
{
...
...
offline/offline.go
View file @
40e5b433
...
...
@@ -9,15 +9,15 @@ import (
"time"
proto
"github.com/gogo/protobuf/proto"
cid
"git
hub.com/ipfs
/go-cid"
ds
"git
hub.com/ipfs
/go-datastore"
dshelp
"git
hub.com/ipfs/go-ipfs
-ds-help"
cid
"git
lab.dms3.io/dms3/public
/go-cid"
ds
"git
lab.dms3.io/dms3/public
/go-datastore"
dshelp
"git
lab.dms3.io/dms3/public/go-dms3
-ds-help"
"git
hub.com/lib
p2p/go-
lib
p2p-core/peer"
"git
hub.com/lib
p2p/go-
lib
p2p-core/routing"
"git
lab.dms3.io/
p2p/go-p2p-core/peer"
"git
lab.dms3.io/
p2p/go-p2p-core/routing"
record
"git
hub.com/lib
p2p/go-
lib
p2p-record"
pb
"git
hub.com/lib
p2p/go-
lib
p2p-record/pb"
record
"git
lab.dms3.io/
p2p/go-p2p-record"
pb
"git
lab.dms3.io/
p2p/go-p2p-record/pb"
)
// ErrOffline is returned when trying to perform operations that
...
...
offline/offline_test.go
View file @
40e5b433
...
...
@@ -5,11 +5,11 @@ import (
"context"
"testing"
cid
"git
hub.com/ipfs
/go-cid"
ds
"git
hub.com/ipfs
/go-datastore"
cid
"git
lab.dms3.io/dms3/public
/go-cid"
ds
"git
lab.dms3.io/dms3/public
/go-datastore"
"git
hub.com/lib
p2p/go-
lib
p2p-core/routing"
"git
hub.com/lib
p2p/go-
lib
p2p-core/test"
"git
lab.dms3.io/
p2p/go-p2p-core/routing"
"git
lab.dms3.io/
p2p/go-p2p-core/test"
mh
"github.com/multiformats/go-multihash"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment