Full MVC of gitlab-zoekt-indexer
All threads resolved!
All threads resolved!
Compare changes
Files
4+ 102
− 69
@@ -18,6 +18,7 @@ import (
@@ -18,6 +18,7 @@ import (
@@ -28,6 +29,7 @@ type options struct {
@@ -28,6 +29,7 @@ type options struct {
@@ -42,11 +44,50 @@ type gitalyConnectionInfo struct {
@@ -42,11 +44,50 @@ type gitalyConnectionInfo struct {
@@ -56,6 +97,11 @@ func (s *indexServer) createIndexDir() {
@@ -56,6 +97,11 @@ func (s *indexServer) createIndexDir() {
@@ -82,12 +128,12 @@ func (s *indexServer) handleStatus() http.HandlerFunc {
@@ -82,12 +128,12 @@ func (s *indexServer) handleStatus() http.HandlerFunc {
@@ -106,6 +152,10 @@ func (s *indexServer) decode(r *http.Request, v interface{}) error {
@@ -106,6 +152,10 @@ func (s *indexServer) decode(r *http.Request, v interface{}) error {
@@ -114,14 +164,6 @@ func (s *indexServer) handleIndex() http.HandlerFunc {
@@ -114,14 +164,6 @@ func (s *indexServer) handleIndex() http.HandlerFunc {
@@ -132,48 +174,45 @@ func (s *indexServer) handleIndex() http.HandlerFunc {
@@ -132,48 +174,45 @@ func (s *indexServer) handleIndex() http.HandlerFunc {
@@ -184,11 +223,11 @@ func (s *indexServer) handleTruncate() http.HandlerFunc {
@@ -184,11 +223,11 @@ func (s *indexServer) handleTruncate() http.HandlerFunc {
@@ -197,24 +236,31 @@ func (s *indexServer) respondWith(w http.ResponseWriter, r *http.Request, route
@@ -197,24 +236,31 @@ func (s *indexServer) respondWith(w http.ResponseWriter, r *http.Request, route
func (s *indexServer) respondWithError(w http.ResponseWriter, r *http.Request, route string, err error) {
@@ -239,24 +285,6 @@ func (s *indexServer) initMetrics() {
@@ -239,24 +285,6 @@ func (s *indexServer) initMetrics() {
@@ -276,7 +304,8 @@ func main() {
@@ -276,7 +304,8 @@ func main() {
@@ -285,11 +314,15 @@ func main() {
@@ -285,11 +314,15 @@ func main() {