From ce8a17eded0b63be9a78bfbeb9ddba83a114f951 Mon Sep 17 00:00:00 2001 From: Todd Gruben Date: Fri, 13 Dec 2013 15:09:02 -0600 Subject: [PATCH] phase 1 api intergration --- cruncher/cruncher.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/cruncher/cruncher.go b/cruncher/cruncher.go index 2cec4f4c2..47db56d36 100644 --- a/cruncher/cruncher.go +++ b/cruncher/cruncher.go @@ -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 {