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"`
|
||||
}
|
||||
|
||||
type victorOpsErrorResponse struct {
|
||||
Result string `json:"result"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
// Notify implements the Notifier interface.
|
||||
func (n *VictorOps) Notify(ctx context.Context, as ...*types.Alert) (bool, error) {
|
||||
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.
|
||||
type InhibitStage struct {
|
||||
muter types.Muter
|
||||
marker types.Marker
|
||||
muter types.Muter
|
||||
}
|
||||
|
||||
// NewInhibitStage return a new InhibitStage.
|
||||
|
|
|
@ -21,8 +21,6 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/go-kit/kit/log"
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"github.com/golang/protobuf/ptypes/timestamp"
|
||||
"github.com/prometheus/common/model"
|
||||
"github.com/stretchr/testify/require"
|
||||
"golang.org/x/net/context"
|
||||
|
@ -75,14 +73,6 @@ func (l *testNflog) Snapshot(w io.Writer) (int, error) {
|
|||
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{} {
|
||||
res := map[uint64]struct{}{}
|
||||
|
||||
|
|
|
@ -285,15 +285,3 @@ func alertsEqual(a1, a2 *types.Alert) bool {
|
|||
}
|
||||
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