From 80f6226c3e168d04ce107820ab4396c21220aac2 Mon Sep 17 00:00:00 2001 From: Alex Yu Date: Fri, 31 May 2019 05:55:55 +0300 Subject: [PATCH] Tidying source: 1. Removal of commented lines (noted by Ivan) 2. Renaming messaging/client.go -> messaging/factory.go (because messaging.Client was already renamed into MsgFactory) --- pkg/messaging/{client.go => factory.go} | 2 +- .../{client_no_ci_test.go => factory_noci_test.go} | 0 pkg/messaging/{client_test.go => factory_test.go} | 0 pkg/transport/manager.go | 6 ++---- 4 files changed, 3 insertions(+), 5 deletions(-) rename pkg/messaging/{client.go => factory.go} (99%) rename pkg/messaging/{client_no_ci_test.go => factory_noci_test.go} (100%) rename pkg/messaging/{client_test.go => factory_test.go} (100%) diff --git a/pkg/messaging/client.go b/pkg/messaging/factory.go similarity index 99% rename from pkg/messaging/client.go rename to pkg/messaging/factory.go index 394edddf21..b35fff7444 100644 --- a/pkg/messaging/client.go +++ b/pkg/messaging/factory.go @@ -39,7 +39,7 @@ type clientLink struct { chans *chanList } -// Config configures Client. +// Config configures MsgFactory type Config struct { PubKey cipher.PubKey SecKey cipher.SecKey diff --git a/pkg/messaging/client_no_ci_test.go b/pkg/messaging/factory_noci_test.go similarity index 100% rename from pkg/messaging/client_no_ci_test.go rename to pkg/messaging/factory_noci_test.go diff --git a/pkg/messaging/client_test.go b/pkg/messaging/factory_test.go similarity index 100% rename from pkg/messaging/client_test.go rename to pkg/messaging/factory_test.go diff --git a/pkg/transport/manager.go b/pkg/transport/manager.go index f30d217ea7..bfc228e495 100644 --- a/pkg/transport/manager.go +++ b/pkg/transport/manager.go @@ -58,10 +58,8 @@ func NewManager(config *ManagerConfig, factories ...Factory) (*Manager, error) { factories: fMap, transports: make(map[uuid.UUID]*ManagedTransport), entries: mEntries, - // AcceptedTrChan: make(chan *ManagedTransport, 10), - // DialedTrChan: make(chan *ManagedTransport, 10), - TrChan: make(chan *ManagedTransport, 9), //IDK why it was 10 before - doneChan: make(chan struct{}), + TrChan: make(chan *ManagedTransport, 9), // TODO: eliminate or justify buffering here + doneChan: make(chan struct{}), }, nil }