Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions admin/ops.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ package admin
import (
"embed"
"encoding/json"
"github.com/fabricekabongo/loggerhead/clustering"
"github.com/fabricekabongo/loggerhead/config"
"github.com/prometheus/client_golang/prometheus/promhttp"
"html/template"
"log"
"net/http"
"runtime"

"github.com/fabricekabongo/loggerhead/clustering"
"github.com/fabricekabongo/loggerhead/config"
"github.com/prometheus/client_golang/prometheus/promhttp"
)

var (
Expand Down Expand Up @@ -128,7 +129,7 @@ func (o *OpsServer) AdminData() http.Handler {
})
}

func (o *OpsServer) AdminUI() http.Handler {
func (*OpsServer) AdminUI() http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
err := TMPL.Execute(w, nil)
if err != nil {
Expand Down
7 changes: 4 additions & 3 deletions clustering/broadcast-delegate.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package clustering

import (
"log"
"os"

"github.com/fabricekabongo/loggerhead/query"
"github.com/fabricekabongo/loggerhead/world"
"github.com/hashicorp/memberlist"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"log"
"os"
)

var (
Expand Down Expand Up @@ -52,7 +53,7 @@ func newBroadcastDelegate(engine *query.Engine, broadcasts *memberlist.TransmitL
}
}

func (d *BroadcastDelegate) NodeMeta(limit int) []byte {
func (*BroadcastDelegate) NodeMeta(limit int) []byte {
return []byte{}
}

Expand Down
15 changes: 8 additions & 7 deletions query/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ package query

import (
"errors"
w "github.com/fabricekabongo/loggerhead/world"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"log"
"os"
"strconv"
"strings"
"time"

w "github.com/fabricekabongo/loggerhead/world"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)

var (
Expand Down Expand Up @@ -205,7 +206,7 @@ func (p *GetQueryProcessor) Execute(query string) string {
return stringBuilder.String()
}

func (p *GetQueryProcessor) CanProcess(query string) bool {
func (*GetQueryProcessor) CanProcess(query string) bool {
chunks := strings.Split(query, " ")
if len(chunks) != 3 {
return false
Expand Down Expand Up @@ -248,7 +249,7 @@ func (p *DeleteQueryProcessor) Execute(query string) string {
return version + ",deleted\n"
}

func (p *DeleteQueryProcessor) CanProcess(query string) bool {
func (*DeleteQueryProcessor) CanProcess(query string) bool {
chunks := strings.Split(query, " ")
if len(chunks) != 3 {
return false
Expand Down Expand Up @@ -305,7 +306,7 @@ func (p *SaveQueryProcessor) Execute(query string) string {
return version + ",saved\n"
}

func (p *SaveQueryProcessor) CanProcess(query string) bool {
func (*SaveQueryProcessor) CanProcess(query string) bool {
chunks := strings.Split(query, " ")
if len(chunks) != 5 {
return false
Expand Down Expand Up @@ -370,7 +371,7 @@ func (p *PolyQueryProcessor) Execute(query string) string {
return result.String()
}

func (p *PolyQueryProcessor) CanProcess(query string) bool {
func (*PolyQueryProcessor) CanProcess(query string) bool {
chunks := strings.Split(query, " ")
if len(chunks) != 6 {
return false
Expand Down
5 changes: 3 additions & 2 deletions world/location.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"encoding/gob"
"errors"
"fmt"
"time"

"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"time"
)

var (
Expand Down Expand Up @@ -58,7 +59,7 @@ func NewLocation(ns string, id string, lat float64, lon float64) (*Location, err
return loc, nil
}

func (l *Location) init(ns string, id string, lat float64, lon float64) (*Location, error) {
func (*Location) init(ns string, id string, lat float64, lon float64) (*Location, error) {
if len(id) == 0 {
validationOps.Inc()
return nil, LocationErrorRequiredId
Expand Down
7 changes: 4 additions & 3 deletions world/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package world

import (
"errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"math"
"sync"

"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)

var (
Expand Down Expand Up @@ -155,7 +156,7 @@ func (node *TreeNode) divide() {
node.mu.Unlock()
}

func (q *QuadTree) reBalance() {
func (*QuadTree) reBalance() {
// TODO: Implement rebalancing
}

Expand Down
Loading