mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-12-08 17:15:36 +00:00
Bump cfssl to 56268a6
This commit is contained in:
24
vendor/github.com/cloudflare/cfssl/api/health/BUILD
generated
vendored
Normal file
24
vendor/github.com/cloudflare/cfssl/api/health/BUILD
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["health.go"],
|
||||
importmap = "k8s.io/kubernetes/vendor/github.com/cloudflare/cfssl/api/health",
|
||||
importpath = "github.com/cloudflare/cfssl/api/health",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["//vendor/github.com/cloudflare/cfssl/api:go_default_library"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
26
vendor/github.com/cloudflare/cfssl/api/health/health.go
generated
vendored
Normal file
26
vendor/github.com/cloudflare/cfssl/api/health/health.go
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
package health
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
"github.com/cloudflare/cfssl/api"
|
||||
)
|
||||
|
||||
// Response contains the response to the /health API
|
||||
type Response struct {
|
||||
Healthy bool `json:"healthy"`
|
||||
}
|
||||
|
||||
func healthHandler(w http.ResponseWriter, r *http.Request) error {
|
||||
response := api.NewSuccessResponse(&Response{Healthy: true})
|
||||
return json.NewEncoder(w).Encode(response)
|
||||
}
|
||||
|
||||
// NewHealthCheck creates a new handler to serve health checks.
|
||||
func NewHealthCheck() http.Handler {
|
||||
return api.HTTPHandler{
|
||||
Handler: api.HandlerFunc(healthHandler),
|
||||
Methods: []string{"GET"},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user