Beispiel #1
0
func WinHandlerKafka(w http.ResponseWriter, r *http.Request, s *kafka.Server) {
	topic := "win"
	value := r.URL.Path[5:]
	s.KafkaSend(w, topic, value)
	//fmt.Fprintf(w, "win: %s", r.URL.Path[5:])
}
Beispiel #2
0
func AdHandlerKafka(w http.ResponseWriter, r *http.Request, s *kafka.Server) {
	topic := "ad"
	value := r.URL.Path[4:]
	s.KafkaSend(w, topic, value)
	//fmt.Fprintf(w, "Ad: %s", r.URL.Path[4:])
}
Beispiel #3
0
func ClickHandlerKafka(w http.ResponseWriter, r *http.Request, s *kafka.Server) {
	topic := "click"
	value := r.URL.Path[7:]
	s.KafkaSend(w, topic, value)
	//fmt.Fprintf(w, "click: %s", r.URL.Path[7:])
}