A robbery at a restaurant in Castro Valley was interrupted when Alameda County sheriff's deputies shot the suspect Friday night.