github.com/ethersphere/bee/v2@v2.2.0/pkg/retrieval/export_test.go (about)

     1  // Copyright 2020 The Swarm Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package retrieval
     6  
     7  import (
     8  	"context"
     9  
    10  	"github.com/ethersphere/bee/v2/pkg/p2p"
    11  	"github.com/ethersphere/bee/v2/pkg/swarm"
    12  )
    13  
    14  func (s *Service) Handler(ctx context.Context, p p2p.Peer, stream p2p.Stream) error {
    15  	return s.handler(ctx, p, stream)
    16  }
    17  
    18  func (s *Service) ClosestPeer(addr swarm.Address, skipPeers []swarm.Address, allowUpstream bool) (swarm.Address, error) {
    19  	return s.closestPeer(addr, skipPeers, allowUpstream)
    20  }