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
3
3
import (
4
4
"context"
5
5
"fmt"
6
+ "strings"
7
+ "time"
8
+
6
9
"github.com/function61/eventhorizon/pkg/ehevent"
7
10
"github.com/function61/gokit/ossignal"
8
11
"github.com/function61/gokit/stringutils"
9
12
"github.com/function61/lambda-alertmanager/pkg/amdomain"
10
13
"github.com/function61/lambda-alertmanager/pkg/amstate"
11
14
"github.com/scylladb/termtables"
12
15
"github.com/spf13/cobra"
13
- "strings"
14
- "time"
15
16
)
16
17
17
18
func alertEntry () * cobra.Command {
Original file line number Diff line number Diff line change @@ -3,13 +3,14 @@ package main
3
3
import (
4
4
"context"
5
5
"fmt"
6
+ "time"
7
+
6
8
"github.com/function61/eventhorizon/pkg/ehevent"
7
9
"github.com/function61/gokit/ossignal"
8
10
"github.com/function61/lambda-alertmanager/pkg/amdomain"
9
11
"github.com/function61/lambda-alertmanager/pkg/amstate"
10
12
"github.com/scylladb/termtables"
11
13
"github.com/spf13/cobra"
12
- "time"
13
14
)
14
15
15
16
func deadMansSwitchEntry () * cobra.Command {
Original file line number Diff line number Diff line change @@ -2,16 +2,17 @@ package main
2
2
3
3
import (
4
4
"context"
5
+ "strings"
6
+ "testing"
7
+ "time"
8
+
5
9
"github.com/function61/eventhorizon/pkg/ehclient"
6
10
"github.com/function61/eventhorizon/pkg/ehevent"
7
11
"github.com/function61/eventhorizon/pkg/ehreader"
8
12
"github.com/function61/eventhorizon/pkg/ehreader/ehreadertest"
9
13
"github.com/function61/gokit/assert"
10
14
"github.com/function61/lambda-alertmanager/pkg/amdomain"
11
15
"github.com/function61/lambda-alertmanager/pkg/amstate"
12
- "strings"
13
- "testing"
14
- "time"
15
16
)
16
17
17
18
func TestDeadmansswitchCheckin (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -3,14 +3,15 @@ package main
3
3
import (
4
4
"context"
5
5
"fmt"
6
+ "time"
7
+
6
8
"github.com/function61/eventhorizon/pkg/ehevent"
7
9
"github.com/function61/gokit/ossignal"
8
10
"github.com/function61/gokit/stringutils"
9
11
"github.com/function61/lambda-alertmanager/pkg/amdomain"
10
12
"github.com/function61/lambda-alertmanager/pkg/amstate"
11
13
"github.com/scylladb/termtables"
12
14
"github.com/spf13/cobra"
13
- "time"
14
15
)
15
16
16
17
func httpMonitorEntry () * cobra.Command {
Original file line number Diff line number Diff line change @@ -3,15 +3,16 @@ package main
3
3
import (
4
4
"context"
5
5
"fmt"
6
- "github.com/function61/gokit/ezhttp"
7
- "github.com/function61/gokit/logex"
8
- "github.com/function61/lambda-alertmanager/pkg/amstate"
9
6
"io/ioutil"
10
7
"log"
11
8
"net/http"
12
9
"strings"
13
10
"sync"
14
11
"time"
12
+
13
+ "github.com/function61/gokit/ezhttp"
14
+ "github.com/function61/gokit/logex"
15
+ "github.com/function61/lambda-alertmanager/pkg/amstate"
15
16
)
16
17
17
18
type monitorFailure struct {
Original file line number Diff line number Diff line change @@ -3,9 +3,10 @@ package main
3
3
import (
4
4
"context"
5
5
"fmt"
6
+ "testing"
7
+
6
8
"github.com/function61/gokit/assert"
7
9
"github.com/function61/lambda-alertmanager/pkg/amstate"
8
- "testing"
9
10
)
10
11
11
12
func TestOneFails (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -5,13 +5,14 @@ package main
5
5
6
6
import (
7
7
"context"
8
+ "os"
9
+ "strconv"
10
+
8
11
"github.com/aws/aws-lambda-go/events"
9
12
"github.com/function61/eventhorizon/pkg/ehevent"
10
13
"github.com/function61/gokit/logex"
11
14
"github.com/function61/lambda-alertmanager/pkg/amdomain"
12
15
"github.com/function61/lambda-alertmanager/pkg/amstate"
13
- "os"
14
- "strconv"
15
16
)
16
17
17
18
// invoked for "AlertManager-ingest" SNS topic
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package main
3
3
import (
4
4
"context"
5
5
"errors"
6
+
6
7
"github.com/aws/aws-lambda-go/events"
7
8
"github.com/aws/aws-lambda-go/lambda"
8
9
"github.com/function61/gokit/aws/lambdautils"
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ package main
3
3
import (
4
4
"context"
5
5
"fmt"
6
+ "os"
7
+ "time"
8
+
6
9
"github.com/function61/eventhorizon/pkg/ehcli"
7
10
"github.com/function61/eventhorizon/pkg/ehreader"
8
11
"github.com/function61/gokit/aws/lambdautils"
@@ -11,8 +14,6 @@ import (
11
14
"github.com/function61/gokit/ossignal"
12
15
"github.com/function61/lambda-alertmanager/pkg/amstate"
13
16
"github.com/spf13/cobra"
14
- "os"
15
- "time"
16
17
)
17
18
18
19
func main () {
Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ import (
4
4
"context"
5
5
"encoding/json"
6
6
"fmt"
7
+ "log"
8
+ "net/http"
9
+ "os"
10
+ "time"
11
+
7
12
"github.com/function61/gokit/httputils"
8
13
"github.com/function61/gokit/jsonfile"
9
14
"github.com/function61/gokit/logex"
@@ -12,10 +17,6 @@ import (
12
17
"github.com/function61/lambda-alertmanager/pkg/alertmanagertypes"
13
18
"github.com/function61/lambda-alertmanager/pkg/amstate"
14
19
"github.com/spf13/cobra"
15
- "log"
16
- "net/http"
17
- "os"
18
- "time"
19
20
)
20
21
21
22
func newRestApi (ctx context.Context ) http.Handler {
You can’t perform that action at this time.
0 commit comments