rename project
This commit is contained in:
parent
7cce75e8fb
commit
b27d36bbf3
@ -1,3 +1,7 @@
|
||||
## Tests
|
||||
|
||||
$ go test ./handler
|
||||
|
||||
## TODO
|
||||
|
||||
- start cooldown timer, when service was actually scaled up
|
||||
|
@ -1,7 +1,7 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"acos.alcatel-lucent.com/scmrepos/git/micro-analytics/kapacitor-scaling/scaling"
|
||||
"acos.alcatel-lucent.com/scmrepos/git/micro-analytics/kapacitor-scale/scaling"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/influxdata/kapacitor/udf"
|
||||
|
@ -1,9 +1,9 @@
|
||||
package handler_test
|
||||
|
||||
import (
|
||||
"acos.alcatel-lucent.com/scmrepos/git/micro-analytics/kapacitor-scaling/handler"
|
||||
"acos.alcatel-lucent.com/scmrepos/git/micro-analytics/kapacitor-scaling/rancher"
|
||||
"acos.alcatel-lucent.com/scmrepos/git/micro-analytics/kapacitor-scaling/scaling"
|
||||
"acos.alcatel-lucent.com/scmrepos/git/micro-analytics/kapacitor-scale/handler"
|
||||
"acos.alcatel-lucent.com/scmrepos/git/micro-analytics/kapacitor-scale/rancher"
|
||||
"acos.alcatel-lucent.com/scmrepos/git/micro-analytics/kapacitor-scale/scaling"
|
||||
"bufio"
|
||||
"flag"
|
||||
"fmt"
|
||||
@ -188,6 +188,8 @@ func TestHandler(t *testing.T) {
|
||||
t.Fatalf("expected scale to be 2, got %d", val)
|
||||
}
|
||||
server.writePoint(udfPoint)
|
||||
go t.Fatalf("it should not scale up because of cooldown, got '%v'", server.ReadResponse())
|
||||
go func() {
|
||||
t.Fatalf("it should not scale up because of cooldown, got '%v'", server.ReadResponse())
|
||||
}()
|
||||
time.Sleep(time.Millisecond * 10) // no response, good!
|
||||
}
|
||||
|
8
main.go
8
main.go
@ -9,14 +9,14 @@ import (
|
||||
"os"
|
||||
"syscall"
|
||||
|
||||
"acos.alcatel-lucent.com/scmrepos/git/micro-analytics/kapacitor-scaling/handler"
|
||||
"acos.alcatel-lucent.com/scmrepos/git/micro-analytics/kapacitor-scaling/rancher"
|
||||
"acos.alcatel-lucent.com/scmrepos/git/micro-analytics/kapacitor-scaling/scaling"
|
||||
"acos.alcatel-lucent.com/scmrepos/git/micro-analytics/kapacitor-scale/handler"
|
||||
"acos.alcatel-lucent.com/scmrepos/git/micro-analytics/kapacitor-scale/rancher"
|
||||
"acos.alcatel-lucent.com/scmrepos/git/micro-analytics/kapacitor-scale/scaling"
|
||||
"github.com/influxdata/kapacitor/udf/agent"
|
||||
)
|
||||
|
||||
var (
|
||||
socketPath = flag.String("socket", "/tmp/kapacitor-scaling.sock", "Where to create the unix socket")
|
||||
socketPath = flag.String("socket", "/tmp/kapacitor-scale.sock", "Where to create the unix socket")
|
||||
)
|
||||
|
||||
type acceptor struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package scaling
|
||||
|
||||
import (
|
||||
"acos.alcatel-lucent.com/scmrepos/git/micro-analytics/kapacitor-scaling/rancher"
|
||||
"acos.alcatel-lucent.com/scmrepos/git/micro-analytics/kapacitor-scale/rancher"
|
||||
"fmt"
|
||||
"sync"
|
||||
"time"
|
||||
|
Loading…
Reference in New Issue
Block a user