const connPerPipeline … const pipelineBufSize … var errStopped … type pipeline … func (p *pipeline) start() { … } func (p *pipeline) stop() { … } func (p *pipeline) handle() { … } // post POSTs a data payload to a url. Returns nil if the POST succeeds, // error on any failure. func (p *pipeline) post(data []byte) (err error) { … } // waitSchedule waits other goroutines to be scheduled for a while func waitSchedule() { … }