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