We'd like to analyze the distribution of class groups in function fields. One way to do this is to find a scheme X over F_q whose F_q-points parametrize fields with a given class group. We'll construct the relevant scheme and, modulo a lot of scary topology, determine the asymptotics for class groups of function fields over F_q.