According to Penal Code 1000 drug diversion is a rehabilitation and counseling program. If you are charged with possession, but not selling drugs, you have a good chance of being eligible for the program. Selling drugs is more severe and may disqualify you from this program. A probation officer may be called in as well to determine whether drug diversion is appropriate.
Drug diversion programs are at least a year long, but no more than a year and a half. You may be required to pay a drug diversion restitution fee to participate - between $100 and $1000 - depending on your ability to pay and the severity of the charges.