Newer
Older
// Code generated by goa v3.12.1, DO NOT EDIT.
//
// health HTTP server encoders and decoders
//
// Command:
// $ goa gen gitlab.eclipse.org/eclipse/xfsc/tsa/policy/design
package server
import (
"context"
"net/http"
goahttp "goa.design/goa/v3/http"
)
// EncodeLivenessResponse returns an encoder for responses returned by the
// health Liveness endpoint.
func EncodeLivenessResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error {
return func(ctx context.Context, w http.ResponseWriter, v any) error {
w.WriteHeader(http.StatusOK)
return nil
}
}
// EncodeReadinessResponse returns an encoder for responses returned by the
// health Readiness endpoint.
func EncodeReadinessResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error {
return func(ctx context.Context, w http.ResponseWriter, v any) error {
w.WriteHeader(http.StatusOK)
return nil
}
}