mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-08 03:47:51 +00:00
26 lines
598 B
Go
26 lines
598 B
Go
package core
|
|
|
|
import (
|
|
"github.com/davecgh/go-spew/spew"
|
|
"pilosa/index"
|
|
)
|
|
|
|
|
|
type Cruncher struct {
|
|
close_chan chan bool
|
|
}
|
|
|
|
func (cruncher *Cruncher) Run(port int) {
|
|
spew.Dump("Cruncher.Run")
|
|
spew.Dump(port)
|
|
web_api:= index.NewFragmentContainer()
|
|
// web_api.AddFragment("general", "25", 0, "AAA-BBB-CCC")
|
|
// web_api.AddFragment("general", "25", 1, "AAA-BBB-CCC")
|
|
// web_api.AddFragment("general", "25", 2, "AAA-BBB-CCC")
|
|
|
|
started:= make(chan bool)
|
|
go web_api.RunServer(port , cruncher.close_chan ,started )
|
|
<-started
|
|
//server is listening and going
|
|
|
|
}
|