code: func (t *Tx) Capacity(recordSize uint64) uint64 {
  	available := uint64(len(t.p.buffer)) - sizeOfSlotHeader
  	entryLen := payloadToSlotSize(recordSize)
  	return available / entryLen
  }
docs: // Capacity determines how many records of the given size can be written to the
  // pipe before it fills up.