Documentation ¶
Index ¶
- func AddIpToContextAndLogger(next http.Handler) http.Handler
- func ContextWithIp(ctx context.Context, ip iam4kube.IP) context.Context
- func ErrorRenderer(errorCounter prometheus.Counter, ...) http.HandlerFunc
- func Iam4kubeServerHeader() func(http.Handler) http.Handler
- func IpFromContext(ctx context.Context) iam4kube.IP
- func PageNotFound(w http.ResponseWriter, _ *http.Request)
- func PerRequestContextLogger(logger *zap.Logger) func(next http.Handler) http.Handler
- func RegisterAll(registry prometheus.Registerer, metrics ...prometheus.Collector) error
- func RoleNameFromRoleArn(roleArn arn.ARN) (string, error)
- func SetServerHeader(server string) func(http.Handler) http.Handler
- func StartStopServer(ctx context.Context, srv *http.Server, shutdownTimeout time.Duration) error
- func TimeRequest(histogram prometheus.Histogram, next http.Handler) http.HandlerFunc
- func ValidateIamRoleArn(roleArn arn.ARN) error
- func WriteJson(w http.ResponseWriter, data interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorRenderer ¶
func ErrorRenderer(errorCounter prometheus.Counter, f func(http.ResponseWriter, *http.Request) error) http.HandlerFunc
func PageNotFound ¶
func PageNotFound(w http.ResponseWriter, _ *http.Request)
func PerRequestContextLogger ¶
func RegisterAll ¶
func RegisterAll(registry prometheus.Registerer, metrics ...prometheus.Collector) error
func RoleNameFromRoleArn ¶
RoleNameFromRoleArn returns the role name part of the ARN. It does not perform validation of the general ARN structure.
func StartStopServer ¶
func TimeRequest ¶
func TimeRequest(histogram prometheus.Histogram, next http.Handler) http.HandlerFunc
func ValidateIamRoleArn ¶
func WriteJson ¶
func WriteJson(w http.ResponseWriter, data interface{}) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.