Coating made of cobalt or of Co-based alloys