File tree Expand file tree Collapse file tree 18 files changed +51
-33
lines changed
Expand file tree Collapse file tree 18 files changed +51
-33
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,16 @@ package main
33import (
44 "context"
55 "fmt"
6+ "strings"
7+ "time"
8+
69 "github.com/function61/eventhorizon/pkg/ehevent"
710 "github.com/function61/gokit/ossignal"
811 "github.com/function61/gokit/stringutils"
912 "github.com/function61/lambda-alertmanager/pkg/amdomain"
1013 "github.com/function61/lambda-alertmanager/pkg/amstate"
1114 "github.com/scylladb/termtables"
1215 "github.com/spf13/cobra"
13- "strings"
14- "time"
1516)
1617
1718func alertEntry () * cobra.Command {
Original file line number Diff line number Diff line change @@ -3,13 +3,14 @@ package main
33import (
44 "context"
55 "fmt"
6+ "time"
7+
68 "github.com/function61/eventhorizon/pkg/ehevent"
79 "github.com/function61/gokit/ossignal"
810 "github.com/function61/lambda-alertmanager/pkg/amdomain"
911 "github.com/function61/lambda-alertmanager/pkg/amstate"
1012 "github.com/scylladb/termtables"
1113 "github.com/spf13/cobra"
12- "time"
1314)
1415
1516func deadMansSwitchEntry () * cobra.Command {
Original file line number Diff line number Diff line change @@ -2,16 +2,17 @@ package main
22
33import (
44 "context"
5+ "strings"
6+ "testing"
7+ "time"
8+
59 "github.com/function61/eventhorizon/pkg/ehclient"
610 "github.com/function61/eventhorizon/pkg/ehevent"
711 "github.com/function61/eventhorizon/pkg/ehreader"
812 "github.com/function61/eventhorizon/pkg/ehreader/ehreadertest"
913 "github.com/function61/gokit/assert"
1014 "github.com/function61/lambda-alertmanager/pkg/amdomain"
1115 "github.com/function61/lambda-alertmanager/pkg/amstate"
12- "strings"
13- "testing"
14- "time"
1516)
1617
1718func TestDeadmansswitchCheckin (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -3,14 +3,15 @@ package main
33import (
44 "context"
55 "fmt"
6+ "time"
7+
68 "github.com/function61/eventhorizon/pkg/ehevent"
79 "github.com/function61/gokit/ossignal"
810 "github.com/function61/gokit/stringutils"
911 "github.com/function61/lambda-alertmanager/pkg/amdomain"
1012 "github.com/function61/lambda-alertmanager/pkg/amstate"
1113 "github.com/scylladb/termtables"
1214 "github.com/spf13/cobra"
13- "time"
1415)
1516
1617func httpMonitorEntry () * cobra.Command {
Original file line number Diff line number Diff line change @@ -3,15 +3,16 @@ package main
33import (
44 "context"
55 "fmt"
6- "github.com/function61/gokit/ezhttp"
7- "github.com/function61/gokit/logex"
8- "github.com/function61/lambda-alertmanager/pkg/amstate"
96 "io/ioutil"
107 "log"
118 "net/http"
129 "strings"
1310 "sync"
1411 "time"
12+
13+ "github.com/function61/gokit/ezhttp"
14+ "github.com/function61/gokit/logex"
15+ "github.com/function61/lambda-alertmanager/pkg/amstate"
1516)
1617
1718type monitorFailure struct {
Original file line number Diff line number Diff line change @@ -3,9 +3,10 @@ package main
33import (
44 "context"
55 "fmt"
6+ "testing"
7+
68 "github.com/function61/gokit/assert"
79 "github.com/function61/lambda-alertmanager/pkg/amstate"
8- "testing"
910)
1011
1112func TestOneFails (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -5,13 +5,14 @@ package main
55
66import (
77 "context"
8+ "os"
9+ "strconv"
10+
811 "github.com/aws/aws-lambda-go/events"
912 "github.com/function61/eventhorizon/pkg/ehevent"
1013 "github.com/function61/gokit/logex"
1114 "github.com/function61/lambda-alertmanager/pkg/amdomain"
1215 "github.com/function61/lambda-alertmanager/pkg/amstate"
13- "os"
14- "strconv"
1516)
1617
1718// invoked for "AlertManager-ingest" SNS topic
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package main
33import (
44 "context"
55 "errors"
6+
67 "github.com/aws/aws-lambda-go/events"
78 "github.com/aws/aws-lambda-go/lambda"
89 "github.com/function61/gokit/aws/lambdautils"
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ package main
33import (
44 "context"
55 "fmt"
6+ "os"
7+ "time"
8+
69 "github.com/function61/eventhorizon/pkg/ehcli"
710 "github.com/function61/eventhorizon/pkg/ehreader"
811 "github.com/function61/gokit/aws/lambdautils"
@@ -11,8 +14,6 @@ import (
1114 "github.com/function61/gokit/ossignal"
1215 "github.com/function61/lambda-alertmanager/pkg/amstate"
1316 "github.com/spf13/cobra"
14- "os"
15- "time"
1617)
1718
1819func main () {
Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ import (
44 "context"
55 "encoding/json"
66 "fmt"
7+ "log"
8+ "net/http"
9+ "os"
10+ "time"
11+
712 "github.com/function61/gokit/httputils"
813 "github.com/function61/gokit/jsonfile"
914 "github.com/function61/gokit/logex"
@@ -12,10 +17,6 @@ import (
1217 "github.com/function61/lambda-alertmanager/pkg/alertmanagertypes"
1318 "github.com/function61/lambda-alertmanager/pkg/amstate"
1419 "github.com/spf13/cobra"
15- "log"
16- "net/http"
17- "os"
18- "time"
1920)
2021
2122func newRestApi (ctx context.Context ) http.Handler {
You can’t perform that action at this time.
0 commit comments