phase 1 api intergration

This commit is contained in:
Todd Gruben 2013-12-13 15:09:02 -06:00
parent 84c6900197
commit ce8a17eded

View file

@ -12,16 +12,23 @@ import (
type Cruncher struct {
core.Service
close_chan chan bool
api *index.FragmentContainer
}
func (cruncher *Cruncher) Run(port int) {
spew.Dump("Cruncher.Run")
spew.Dump(port)
web_api:= index.NewFragmentContainer()
started:= make(chan bool)
go web_api.RunServer(port , cruncher.close_chan ,started )
cruncher.api = index.NewFragmentContainer()
/*
bh = api.Get(frag,tileid)
api.SetBit(frag,bh,1)
api.Count(frag,bh)
api.Union(frag,[bh1,bh2])
api.Intersect(frag,[bh1,bh2])
*/
cruncher.Service.Run()
<-started
}
func NewCruncher() *Cruncher {