Skip to content

Commit

Permalink
Remove unused 'ns' param in pubsub.New.
Browse files Browse the repository at this point in the history
  • Loading branch information
lthibault committed Jul 25, 2022
1 parent 5f83dfc commit 67c1d8d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/server/joiner.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (j Joiner) Join(ctx context.Context, vat vat.Network, ps PubSub) (*Node, er

vat.Export(
pubsub_cap.Capability,
pubsub_cap.New(vat.NS, ps, pubsub_cap.WithLogger(logger)))
pubsub_cap.New(ps, pubsub_cap.WithLogger(logger)))

vat.Export(
cluster_cap.HostCapability,
Expand Down
4 changes: 2 additions & 2 deletions pkg/vat/cap/pubsub/pubsub_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func BenchmarkPubSubCap(b *testing.B) {
pubsub.WithGossipSubProtocols(Subprotocols()))

require.NoError(b, err)
server := pscap.New(ns, ps)
server := pscap.New(ps)
defer server.Close()

client := pscap.PubSub{Client: server.Client()}
Expand Down Expand Up @@ -153,7 +153,7 @@ func BenchmarkPubSubCapNetwork(b *testing.B) {
pubsub.WithGossipSubProtocols(Subprotocols()))

require.NoError(b, err)
server := pscap.New(ns, ps)
server := pscap.New(ps)
defer server.Close()

left, right := transport.NewPipe(1)
Expand Down
2 changes: 1 addition & 1 deletion pkg/vat/cap/pubsub/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type Provider struct {
ts map[string]*refCountedTopic
}

func New(ns string, ps TopicJoiner, opt ...Option) *Provider {
func New(ps TopicJoiner, opt ...Option) *Provider {
var f = &Provider{
cq: make(chan struct{}),
ps: ps,
Expand Down
2 changes: 1 addition & 1 deletion pkg/vat/cap/pubsub/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestPubSub_refcount(t *testing.T) {
gs, err := pubsub.NewGossipSub(ctx, h)
require.NoError(t, err)

p := pscap.New("test", gs, pscap.WithLogger(log))
p := pscap.New(gs, pscap.WithLogger(log))
defer func() {
assert.NoError(t, p.Close(), "factory should close gracefully")
assert.ErrorIs(t, p.Close(), pscap.ErrClosed)
Expand Down

0 comments on commit 67c1d8d

Please sign in to comment.