Remove unused function in confconnector
This commit is contained in:
parent
5f62fc7e88
commit
63007032e4
@ -25,7 +25,6 @@ func NewConfConnector(conf nodeconf.Configuration, pool pool.Pool) ConfConnector
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *confConnector) Configuration() nodeconf.Configuration {
|
func (s *confConnector) Configuration() nodeconf.Configuration {
|
||||||
// TODO: think about rewriting this, because these deps should not be exposed
|
|
||||||
return s.conf
|
return s.conf
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,19 +33,18 @@ func (s *confConnector) Pool() pool.Pool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *confConnector) GetResponsiblePeers(ctx context.Context, spaceId string) ([]peer.Peer, error) {
|
func (s *confConnector) GetResponsiblePeers(ctx context.Context, spaceId string) ([]peer.Peer, error) {
|
||||||
return s.connectOneOrMany(ctx, spaceId, nil, s.pool.Get, s.pool.GetOneOf)
|
return s.connectOneOrMany(ctx, spaceId, nil, s.pool.Get)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *confConnector) DialInactiveResponsiblePeers(ctx context.Context, spaceId string, activeNodeIds []string) ([]peer.Peer, error) {
|
func (s *confConnector) DialInactiveResponsiblePeers(ctx context.Context, spaceId string, activeNodeIds []string) ([]peer.Peer, error) {
|
||||||
return s.connectOneOrMany(ctx, spaceId, activeNodeIds, s.pool.Dial, s.pool.DialOneOf)
|
return s.connectOneOrMany(ctx, spaceId, activeNodeIds, s.pool.Dial)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *confConnector) connectOneOrMany(
|
func (s *confConnector) connectOneOrMany(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
spaceId string,
|
spaceId string,
|
||||||
activeNodeIds []string,
|
activeNodeIds []string,
|
||||||
connectOne func(context.Context, string) (peer.Peer, error),
|
connectOne func(context.Context, string) (peer.Peer, error)) (peers []peer.Peer, err error) {
|
||||||
connectOneOf func(context.Context, []string) (peer.Peer, error)) (peers []peer.Peer, err error) {
|
|
||||||
var (
|
var (
|
||||||
inactiveNodeIds []string
|
inactiveNodeIds []string
|
||||||
allNodes = s.conf.NodeIds(spaceId)
|
allNodes = s.conf.NodeIds(spaceId)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user