inmem_transport.go
func (i *InmemTransport) AppendEntriesPipeline(id ServerID, target ServerAddress) (AppendPipeline, error) {
	i.Lock()
	defer i.Unlock()

	peer, ok := i.peers[target]
	if !ok {
		return nil, fmt.Errorf("failed to connect to peer: %v", target)
	}
	pipeline := newInmemPipeline(i, peer, target)
	i.pipelines = append(i.pipelines, pipeline)
	return pipeline, nil
}
func (i *InmemTransport) AppendEntriesPipeline(id ServerID, target ServerAddress) (AppendPipeline, error) {
	i.Lock()
	defer i.Unlock()

	peer, ok := i.peers[target]
	if !ok {
		return nil, fmt.Errorf("failed to connect to peer: %v", target)
	}
	pipeline := newInmemPipeline(i, peer, target)
	i.pipelines = append(i.pipelines, pipeline)
	return pipeline, nil
}
func ( i * InmemTransport ) AppendEntriesPipeline ( id ServerID , target ServerAddress ) ( AppendPipeline , error ) { i . Lock ( ) defer i . Unlock ( ) peer , ok := i . peers [ target ] if ! ok { return nil , fmt . Errorf ( " " , target ) } pipeline := newInmemPipeline ( i , peer , target ) i . pipelines = append ( i . pipelines , pipeline ) return pipeline , nil }
// AppendEntriesPipeline returns an interface that can be used to pipeline
// AppendEntries requests.
AppendEntriesPipeline returns an interface that can be used to pipeline AppendEntries requests .