github.com/ethersphere/bee/v2@v2.2.0/pkg/pullsync/doc.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  /*
     6  Package pullsync contains protocol that is used to ensure that there is correct
     7  chunk replication in the neighborhood of the node.
     8  
     9  The protocol is used to exchange information about what chunks are stored on
    10  other nodes and if necessary pull any chunks it needs. It also takes care that
    11  chunks are not synced twice.
    12  
    13  The pullsync protocol uses Protobuf messages for encoding. It then exposes
    14  several functions which use those messages to start the exchange of other node
    15  cursors using `GetCursors` function, after which node can schedule syncing
    16  of chunks using `SyncInterval` function, and in the case of any errors or
    17  timed-out operations cancel syncing using `CancelRuid`.
    18  */
    19  package pullsync