{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v0.6.1-preview","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package statetransfer\n\n## Types\n\n```go\ntype Coordinator interface {\n\tStart() // Start the block transfer go routine\n\tStop()  // Stop up the block transfer go routine\n\n\t// SyncToTarget attempts to move the state to the given target, returning an error, and whether this target might succeed if attempted at a later time\n\tSyncToTarget(blockNumber uint64, blockHash []byte, peerIDs []*pb.PeerID) (error, bool)\n}\n```\nCoordinator is used to initiate state transfer.  Start must be called before use, and Stop should be called to free allocated resources\n\n```go\nfunc NewCoordinatorImpl(stack PartialStack) Coordinator\n```\nNewCoordinatorImpl constructs a coordinatorImpl\n\n```go\ntype PartialStack interface {\n\tpeer.BlockChainAccessor\n\tpeer.BlockChainModifier\n\tpeer.BlockChainUtil\n\tGetPeers() (*pb.PeersMessage, error)\n\tGetPeerEndpoint() (*pb.PeerEndpoint, error)\n\tGetRemoteLedger(receiver *pb.PeerID) (peer.RemoteLedger, error)\n}\n```\nPartialStack is a subset of peer.MessageHandlerCoordinator functionality which is necessary to perform state transfer\n\n","path":"github.com/eric-erki/https-hyperledger.org/core/peer/statetransfer","name":"statetransfer","synopsis":"","isRedistributable":true}
