a valve which is linked by a hinged arm to a ball floating on top of a liquid and opens or closes a tap automatically according to the height of the ball, especially in the cistern of a flushing toilet.
ballcock in other Oxford dictionaries
Definition of ballcock in the US English dictionary