1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-16 09:16:38 +00:00
prometheus-operator/example/alertmanager-webhook/main.go
dongjiang ed3aede934
chore: bump to golangci-lint v1.56.2 (#6384)
* update golangci lint version

---------

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
2024-03-12 11:00:44 +01:00

31 lines
931 B
Go

// Copyright 2017 The prometheus-operator Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package main
import (
"fmt"
"net/http"
)
const (
port = "5001"
)
func main() {
fmt.Printf("Listening for Alertmanager notifications on :%s\n", port)
_ = http.ListenAndServe(":"+port, http.HandlerFunc(func(_ http.ResponseWriter, _ *http.Request) {
fmt.Println("Alertmanager Notification Payload Received")
}))
}