func init() { http.Handle("/", http.HandlerFunc(defaultHandler)) http.Handle("/healthz", Healthz) http.Handle("/varz", Varz) // birpc birpcconns := make(chan net.Conn) http.Handle("/birpc", &direct.Handler{birpcconns}) go birpc.DispatchForever(birpcconns, RPC, RPCClientsCh) // streamz subs := make(chan net.Conn) http.Handle("/streamz", &direct.Handler{subs}) go streamz.DispatchForever(subs, StreamzCh) go streamz.Ticker(StreamzCh) killHandler := borkborkbork.New(syscall.SIGKILL) intHandler := borkborkbork.New(syscall.SIGINT) http.Handle("/killkillkill", killHandler) http.Handle("/intintint", intHandler) // mem Varz.Register(mem.Varz, "mem") http.HandleFunc("/create", mem.Create) http.HandleFunc("/delete", mem.Delete) http.HandleFunc("/gc", mem.GC) }
func init() { http.Handle("/", http.HandlerFunc(defaultHandler)) http.Handle("/healthz", Healthz) http.Handle("/varz", Varz) http.Handle("/birpc", birpc.Handler(BiRPC, BiRPCClientsCh)) killHandler := borkborkbork.New(syscall.SIGKILL) intHandler := borkborkbork.New(syscall.SIGINT) http.Handle("/killkillkill", killHandler) http.Handle("/intintint", intHandler) // mem Varz.Register(mem.Varz, "mem") http.HandleFunc("/create", mem.Create) http.HandleFunc("/delete", mem.Delete) http.HandleFunc("/gc", mem.GC) }