NewReplicator returns a replicator for the passed node.
(n *Node)
| 63 | |
| 64 | // NewReplicator returns a replicator for the passed node. |
| 65 | func newReplicator(n *Node) *replicator { |
| 66 | return &replicator{ |
| 67 | n: n, |
| 68 | peers: make(map[string]*peerSync), |
| 69 | quit: make(chan struct{}), |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | // Stop stops replication. |
| 74 | func (r *replicator) Stop() { |