From 11d3e9ac69f69f022aa6193bc8f15adf9ac84c95 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Tue, 16 Feb 2016 19:21:06 -0800 Subject: [PATCH] rafthttp: better comment for streamWriter --- rafthttp/stream.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rafthttp/stream.go b/rafthttp/stream.go index ecf494130..a3b8d9a3c 100644 --- a/rafthttp/stream.go +++ b/rafthttp/stream.go @@ -95,8 +95,7 @@ type outgoingConn struct { io.Closer } -// streamWriter is a long-running go-routine that writes messages into the -// attached outgoingConn. +// streamWriter writes messages to the attached outgoingConn. type streamWriter struct { id types.ID status *peerStatus @@ -113,6 +112,8 @@ type streamWriter struct { done chan struct{} } +// startStreamWriter creates a streamWrite and starts a long running go-routine that accepts +// messages and writes to the attached outgoing connection. func startStreamWriter(id types.ID, status *peerStatus, fs *stats.FollowerStats, r Raft) *streamWriter { w := &streamWriter{ id: id,