mirror of
https://github.com/prometheus/alertmanager
synced 2025-02-16 10:37:09 +00:00
Remove unused code (#1272)
This commit is contained in:
parent
dd75201f1c
commit
7b80919b36
@ -1151,11 +1151,6 @@ type victorOpsMessage struct {
|
|||||||
MonitoringTool string `json:"monitoring_tool"`
|
MonitoringTool string `json:"monitoring_tool"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type victorOpsErrorResponse struct {
|
|
||||||
Result string `json:"result"`
|
|
||||||
Message string `json:"message"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Notify implements the Notifier interface.
|
// Notify implements the Notifier interface.
|
||||||
func (n *VictorOps) Notify(ctx context.Context, as ...*types.Alert) (bool, error) {
|
func (n *VictorOps) Notify(ctx context.Context, as ...*types.Alert) (bool, error) {
|
||||||
victorOpsAllowedEvents := map[string]bool{
|
victorOpsAllowedEvents := map[string]bool{
|
||||||
|
@ -340,8 +340,7 @@ func (n *GossipSettleStage) Exec(ctx context.Context, l log.Logger, alerts ...*t
|
|||||||
|
|
||||||
// InhibitStage filters alerts through an inhibition muter.
|
// InhibitStage filters alerts through an inhibition muter.
|
||||||
type InhibitStage struct {
|
type InhibitStage struct {
|
||||||
muter types.Muter
|
muter types.Muter
|
||||||
marker types.Marker
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewInhibitStage return a new InhibitStage.
|
// NewInhibitStage return a new InhibitStage.
|
||||||
|
@ -21,8 +21,6 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/go-kit/kit/log"
|
"github.com/go-kit/kit/log"
|
||||||
"github.com/golang/protobuf/ptypes"
|
|
||||||
"github.com/golang/protobuf/ptypes/timestamp"
|
|
||||||
"github.com/prometheus/common/model"
|
"github.com/prometheus/common/model"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
@ -75,14 +73,6 @@ func (l *testNflog) Snapshot(w io.Writer) (int, error) {
|
|||||||
return 0, nil
|
return 0, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func mustTimestampProto(ts time.Time) *timestamp.Timestamp {
|
|
||||||
tspb, err := ptypes.TimestampProto(ts)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
return tspb
|
|
||||||
}
|
|
||||||
|
|
||||||
func alertHashSet(hashes ...uint64) map[uint64]struct{} {
|
func alertHashSet(hashes ...uint64) map[uint64]struct{} {
|
||||||
res := map[uint64]struct{}{}
|
res := map[uint64]struct{}{}
|
||||||
|
|
||||||
|
@ -285,15 +285,3 @@ func alertsEqual(a1, a2 *types.Alert) bool {
|
|||||||
}
|
}
|
||||||
return a1.Timeout == a2.Timeout
|
return a1.Timeout == a2.Timeout
|
||||||
}
|
}
|
||||||
|
|
||||||
func alertListEqual(a1, a2 []*types.Alert) bool {
|
|
||||||
if len(a1) != len(a2) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
for i, a := range a1 {
|
|
||||||
if !alertsEqual(a, a2[i]) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user