Skip to content

Commit

Permalink
Switch to the gb build system. Fixes skizzehq#98
Browse files Browse the repository at this point in the history
  • Loading branch information
njpatel committed Jan 17, 2016
1 parent f2f8166 commit 0afc3c7
Show file tree
Hide file tree
Showing 34 changed files with 222 additions and 71 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Expand Up @@ -23,3 +23,8 @@ _testmain.go
*.test
*.prof
.DS_Store

# gb
bin
pkg
vendor/src
24 changes: 4 additions & 20 deletions .travis.yml
Expand Up @@ -3,27 +3,11 @@ go:
- 1.5

install:
- go get github.com/hashicorp/golang-lru
- go get github.com/BurntSushi/toml
- go get code.google.com/p/gofarmhash
- go get github.com/boltdb/bolt
- go get github.com/facebookgo/httpdown
- go get github.com/facebookgo/grace/gracehttp
- go get github.com/dgryski/go-farm
- go get github.com/lazybeaver/xorshift
- go get github.com/dgryski/go-pcgr
- go get github.com/willf/bitset
- go get github.com/willf/bloom
- go get github.com/retailnext/hllpp
- go get github.com/skizzehq/count-min-log
- go get github.com/dgryski/go-topk
- go get github.com/gogo/protobuf/proto
- go get google.golang.org/grpc
- go get golang.org/x/net/context
- go get github.com/peterh/liner
- go get github.com/constabulary/gb/...

# before_script:
- go vet ./...
- gb vendor restore
- go build

script:
- go test -v ./...
- gb test -v
3 changes: 2 additions & 1 deletion cli/main.go → src/cli/main.go
Expand Up @@ -14,7 +14,8 @@ import (

"github.com/gogo/protobuf/proto"
"github.com/peterh/liner"
pb "github.com/skizzehq/skizze/datamodel"

pb "datamodel"
)

var client pb.SkizzeClient
Expand Down
6 changes: 3 additions & 3 deletions config/config.go → src/config/config.go
Expand Up @@ -7,9 +7,9 @@ import (
"strconv"
"strings"

"github.com/skizzehq/skizze/utils"

"github.com/BurntSushi/toml"

"utils"
)

// Config stores all configuration parameters for Go
Expand All @@ -35,7 +35,7 @@ func parseConfigTOML() *Config {
utils.PanicOnError(err)
path, err = filepath.Abs(path)
utils.PanicOnError(err)
configPath = filepath.Join(path, "config/default.toml")
configPath = filepath.Join(path, "src/config/default.toml")
}
_, err := os.Open(configPath)
utils.PanicOnError(err)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions manager/domain.go → src/manager/domain.go
Expand Up @@ -3,9 +3,9 @@ package manager
import (
"fmt"

"github.com/skizzehq/skizze/datamodel"
"github.com/skizzehq/skizze/storage"
"github.com/skizzehq/skizze/utils"
"datamodel"
"storage"
"utils"
)

type domainManager struct {
Expand Down
6 changes: 3 additions & 3 deletions manager/info.go → src/manager/info.go
Expand Up @@ -3,9 +3,9 @@ package manager
import (
"fmt"

"github.com/skizzehq/skizze/datamodel"
"github.com/skizzehq/skizze/storage"
"github.com/skizzehq/skizze/utils"
"datamodel"
"storage"
"utils"
)

type infoManager struct {
Expand Down
8 changes: 4 additions & 4 deletions manager/manager.go → src/manager/manager.go
Expand Up @@ -6,10 +6,10 @@ import (
"sync"
"time"

"github.com/skizzehq/skizze/config"
"github.com/skizzehq/skizze/datamodel"
"github.com/skizzehq/skizze/storage"
"github.com/skizzehq/skizze/utils"
"config"
"datamodel"
"storage"
"utils"
)

func isValidType(info *datamodel.Info) bool {
Expand Down
6 changes: 3 additions & 3 deletions manager/manager_test.go → src/manager/manager_test.go
Expand Up @@ -5,9 +5,9 @@ import (
"testing"
"time"

"github.com/skizzehq/skizze/config"
"github.com/skizzehq/skizze/datamodel"
"github.com/skizzehq/skizze/utils"
"config"
"datamodel"
"utils"
)

func TestNoSketches(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions manager/sketch.go → src/manager/sketch.go
Expand Up @@ -3,10 +3,10 @@ package manager
import (
"fmt"

"github.com/skizzehq/skizze/datamodel"
"github.com/skizzehq/skizze/sketches"
"github.com/skizzehq/skizze/storage"
"github.com/skizzehq/skizze/utils"
"datamodel"
"sketches"
"storage"
"utils"
)

type sketchManager struct {
Expand Down
5 changes: 3 additions & 2 deletions server/server.go → src/server/server.go
Expand Up @@ -5,9 +5,10 @@ import (
"log"
"net"

pb "github.com/skizzehq/skizze/datamodel"
"github.com/skizzehq/skizze/manager"
"google.golang.org/grpc"

pb "datamodel"
"manager"
)

type serverStruct struct {
Expand Down
5 changes: 3 additions & 2 deletions server/server_test.go → src/server/server_test.go
Expand Up @@ -4,9 +4,10 @@ import (
"log"
"time"

pb "github.com/skizzehq/skizze/datamodel"
"github.com/skizzehq/skizze/manager"
"google.golang.org/grpc"

pb "datamodel"
"manager"
)

func setupClient() (pb.SkizzeClient, *grpc.ClientConn) {
Expand Down
3 changes: 2 additions & 1 deletion server/sketch.go → src/server/sketch.go
Expand Up @@ -4,9 +4,10 @@ import (
"strings"

"github.com/gogo/protobuf/proto"
pb "github.com/skizzehq/skizze/datamodel"

"golang.org/x/net/context"

pb "datamodel"
)

func (s *serverStruct) CreateSketch(ctx context.Context, in *pb.Sketch) (*pb.Sketch, error) {
Expand Down
8 changes: 4 additions & 4 deletions server/sketch_test.go → src/server/sketch_test.go
Expand Up @@ -3,12 +3,12 @@ package server
import (
"testing"

"github.com/gogo/protobuf/proto"
"golang.org/x/net/context"

"github.com/gogo/protobuf/proto"
"github.com/skizzehq/skizze/config"
pb "github.com/skizzehq/skizze/datamodel"
"github.com/skizzehq/skizze/utils"
"config"
pb "datamodel"
"utils"
)

func TestCreateSketch(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions server/todo.go → src/server/todo.go
@@ -1,9 +1,9 @@
package server

import (
pb "github.com/skizzehq/skizze/datamodel"

"golang.org/x/net/context"

pb "datamodel"
)

func (s *serverStruct) ListDomains(ctx context.Context, in *pb.Empty) (*pb.ListDomainsReply, error) {
Expand Down
3 changes: 2 additions & 1 deletion sketches/bloom.go → src/sketches/bloom.go
@@ -1,8 +1,9 @@
package sketches

import (
"github.com/skizzehq/skizze/datamodel"
"github.com/willf/bloom"

"datamodel"
)

//var logger = utils.GetLogger()
Expand Down
5 changes: 3 additions & 2 deletions sketches/cml.go → src/sketches/cml.go
Expand Up @@ -2,8 +2,9 @@ package sketches

import (
"github.com/seiflotfy/count-min-log"
"github.com/skizzehq/skizze/datamodel"
"github.com/skizzehq/skizze/utils"

"datamodel"
"utils"
)

var logger = utils.GetLogger()
Expand Down
4 changes: 2 additions & 2 deletions sketches/cml_test.go → src/sketches/cml_test.go
Expand Up @@ -3,8 +3,8 @@ package sketches
import (
"testing"

"github.com/skizzehq/skizze/datamodel"
"github.com/skizzehq/skizze/utils"
"datamodel"
"utils"
)

func TestAdd(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion sketches/hllpp.go → src/sketches/hllpp.go
Expand Up @@ -2,7 +2,8 @@ package sketches

import (
"github.com/retailnext/hllpp"
"github.com/skizzehq/skizze/datamodel"

"datamodel"
)

//var logger = utils.GetLogger()
Expand Down
4 changes: 2 additions & 2 deletions sketches/proxy.go → src/sketches/proxy.go
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"sync"

"github.com/skizzehq/skizze/datamodel"
"github.com/skizzehq/skizze/utils"
"datamodel"
"utils"
)

// SketchProxy ...
Expand Down
3 changes: 2 additions & 1 deletion sketches/topk.go → src/sketches/topk.go
Expand Up @@ -5,7 +5,8 @@ import (
"encoding/gob"

"github.com/dgryski/go-topk"
"github.com/skizzehq/skizze/datamodel"

"datamodel"
)

const defaultRank = 100.0
Expand Down
8 changes: 4 additions & 4 deletions main.go → src/skizze/main.go
Expand Up @@ -7,10 +7,10 @@ import (

_ "net/http/pprof"

"github.com/skizzehq/skizze/config"
"github.com/skizzehq/skizze/manager"
"github.com/skizzehq/skizze/server"
"github.com/skizzehq/skizze/utils"
"config"
"manager"
"server"
"utils"
)

var logger = utils.GetLogger()
Expand Down
7 changes: 4 additions & 3 deletions storage/manager.go → src/storage/manager.go
Expand Up @@ -7,9 +7,10 @@ import (
"path/filepath"

"github.com/boltdb/bolt"
"github.com/skizzehq/skizze/config"
"github.com/skizzehq/skizze/datamodel"
"github.com/skizzehq/skizze/utils"

"config"
"datamodel"
"utils"
)

// Manager the storage should deal with 2 types of on disk files, info and data
Expand Down
6 changes: 3 additions & 3 deletions storage/manager_test.go → src/storage/manager_test.go
Expand Up @@ -5,9 +5,9 @@ import (
"reflect"
"testing"

"github.com/skizzehq/skizze/config"
"github.com/skizzehq/skizze/datamodel"
"github.com/skizzehq/skizze/utils"
"config"
"datamodel"
"utils"
)

func TestSaveLoadInfo(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 0afc3c7

Please sign in to comment.