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
p2p
go-p2p-pubsub-router
Commits
a54dd97b
Commit
a54dd97b
authored
Jul 14, 2021
by
tavit ohanian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial port
parent
fe76ad85
Pipeline
#772
passed with stages
in 1 minute and 8 seconds
Changes
7
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
636 additions
and
243 deletions
+636
-243
.gitlab-ci.yml
.gitlab-ci.yml
+35
-0
fetch.go
fetch.go
+6
-6
fetch_test.go
fetch_test.go
+1
-1
go.mod
go.mod
+12
-12
go.sum
go.sum
+567
-209
pubsub.go
pubsub.go
+9
-9
pubsub_test.go
pubsub_test.go
+6
-6
No files found.
.gitlab-ci.yml
0 → 100644
View file @
a54dd97b
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/'
fetch.go
View file @
a54dd97b
...
@@ -5,14 +5,14 @@ import (
...
@@ -5,14 +5,14 @@ import (
"errors"
"errors"
"time"
"time"
"git
hub.com/lib
p2p/go-
lib
p2p-core/host"
"git
lab.dms3.io/
p2p/go-p2p-core/host"
"git
hub.com/lib
p2p/go-
lib
p2p-core/network"
"git
lab.dms3.io/
p2p/go-p2p-core/network"
"git
hub.com/lib
p2p/go-
lib
p2p-core/peer"
"git
lab.dms3.io/
p2p/go-p2p-core/peer"
"git
hub.com/lib
p2p/go-
lib
p2p-core/protocol"
"git
lab.dms3.io/
p2p/go-p2p-core/protocol"
"git
hub.com/lib
p2p/go-msgio/protoio"
"git
lab.dms3.io/
p2p/go-msgio/protoio"
pb
"git
hub.com/lib
p2p/go-
lib
p2p-pubsub-router/pb"
pb
"git
lab.dms3.io/
p2p/go-p2p-pubsub-router/pb"
"github.com/gogo/protobuf/proto"
"github.com/gogo/protobuf/proto"
)
)
...
...
fetch_test.go
View file @
a54dd97b
...
@@ -7,7 +7,7 @@ import (
...
@@ -7,7 +7,7 @@ import (
"testing"
"testing"
"time"
"time"
"git
hub.com/lib
p2p/go-
lib
p2p-core/host"
"git
lab.dms3.io/
p2p/go-p2p-core/host"
)
)
func
connect
(
t
*
testing
.
T
,
a
,
b
host
.
Host
)
{
func
connect
(
t
*
testing
.
T
,
a
,
b
host
.
Host
)
{
...
...
go.mod
View file @
a54dd97b
module
git
hub.com/lib
p2p/go-
lib
p2p-pubsub-router
module
git
lab.dms3.io/
p2p/go-p2p-pubsub-router
go 1.1
2
go 1.1
5
require (
require (
github.com/gogo/protobuf
v1.3.1
github.com/gogo/protobuf
v1.3.1
git
hub.com/ipfs
/go-datastore
v0.
4.4
git
lab.dms3.io/dms3/public
/go-datastore
v0.
0.1
git
hub.com/ipfs/go-ipfs
-ds-help
v0.
1.1
git
lab.dms3.io/dms3/public/go-dms3
-ds-help
v0.
0.2
git
hub.com/ipfs
/go-log/v2
v2.
1.1
git
lab.dms3.io/dms3/public
/go-log/v2
v2.
0.0
git
hub.com/libp2p/go-libp2p-blankhost
v0.
2.0
git
lab.dms3.io/p2p/go-msgio
v0.
0.1
git
hub.com/lib
p2p/go-
lib
p2p-
core
v0.
7.0
git
lab.dms3.io/
p2p/go-p2p-
blankhost
v0.
0.1
git
hub.com/lib
p2p/go-
lib
p2p-
pubsub
v0.
4.0
git
lab.dms3.io/
p2p/go-p2p-
core
v0.
0.1
git
hub.com/lib
p2p/go-
lib
p2p-
record
v0.
1.3
git
lab.dms3.io/
p2p/go-p2p-
pubsub
v0.
0.1
git
hub.com/lib
p2p/go-
lib
p2p-
swarm
v0.
3
.1
git
lab.dms3.io/
p2p/go-p2p-
record
v0.
0
.1
git
hub.com/libp2p/go-msgio
v0.0.
6
git
lab.dms3.io/p2p/go-p2p-swarm
v0.0.
1
golang.org/x/sync
v0.0.0-202
00317015054-43a5402ce75a
golang.org/x/sync
v0.0.0-202
10220032951-036812b2e83c
)
)
go.sum
View file @
a54dd97b
This diff is collapsed.
Click to expand it.
pubsub.go
View file @
a54dd97b
...
@@ -9,17 +9,17 @@ import (
...
@@ -9,17 +9,17 @@ import (
"sync"
"sync"
"time"
"time"
"git
hub.com/lib
p2p/go-
lib
p2p-core/host"
"git
lab.dms3.io/
p2p/go-p2p-core/host"
"git
hub.com/lib
p2p/go-
lib
p2p-core/peer"
"git
lab.dms3.io/
p2p/go-p2p-core/peer"
"git
hub.com/lib
p2p/go-
lib
p2p-core/routing"
"git
lab.dms3.io/
p2p/go-p2p-core/routing"
pubsub
"git
hub.com/lib
p2p/go-
lib
p2p-pubsub"
pubsub
"git
lab.dms3.io/
p2p/go-p2p-pubsub"
record
"git
hub.com/lib
p2p/go-
lib
p2p-record"
record
"git
lab.dms3.io/
p2p/go-p2p-record"
ds
"git
hub.com/ipfs
/go-datastore"
ds
"git
lab.dms3.io/dms3/public
/go-datastore"
dssync
"git
hub.com/ipfs
/go-datastore/sync"
dssync
"git
lab.dms3.io/dms3/public
/go-datastore/sync"
dshelp
"git
hub.com/ipfs/go-ipfs
-ds-help"
dshelp
"git
lab.dms3.io/dms3/public/go-dms3
-ds-help"
logging
"git
hub.com/ipfs
/go-log/v2"
logging
"git
lab.dms3.io/dms3/public
/go-log/v2"
)
)
var
log
=
logging
.
Logger
(
"pubsub-valuestore"
)
var
log
=
logging
.
Logger
(
"pubsub-valuestore"
)
...
...
pubsub_test.go
View file @
a54dd97b
...
@@ -9,13 +9,13 @@ import (
...
@@ -9,13 +9,13 @@ import (
"golang.org/x/sync/errgroup"
"golang.org/x/sync/errgroup"
"git
hub.com/lib
p2p/go-
lib
p2p-core/host"
"git
lab.dms3.io/
p2p/go-p2p-core/host"
"git
hub.com/lib
p2p/go-
lib
p2p-core/routing"
"git
lab.dms3.io/
p2p/go-p2p-core/routing"
bhost
"git
hub.com/lib
p2p/go-
lib
p2p-blankhost"
bhost
"git
lab.dms3.io/
p2p/go-p2p-blankhost"
pubsub
"git
hub.com/lib
p2p/go-
lib
p2p-pubsub"
pubsub
"git
lab.dms3.io/
p2p/go-p2p-pubsub"
record
"git
hub.com/lib
p2p/go-
lib
p2p-record"
record
"git
lab.dms3.io/
p2p/go-p2p-record"
swarmt
"git
hub.com/lib
p2p/go-
lib
p2p-swarm/testing"
swarmt
"git
lab.dms3.io/
p2p/go-p2p-swarm/testing"
)
)
func
newNetHost
(
ctx
context
.
Context
,
t
*
testing
.
T
)
host
.
Host
{
func
newNetHost
(
ctx
context
.
Context
,
t
*
testing
.
T
)
host
.
Host
{
...
...
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