mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-05-10 19:36:34 +00:00
feat(tenant): improve cordoning selection (#1424) Signed-off-by: Hristo Hristov <me@hhristov.info> Co-authored-by: Oliver Bähler <oliverbaehler@hotmail.com>
25 lines
568 B
Go
25 lines
568 B
Go
// Copyright 2020-2023 Project Capsule Authors.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package route
|
|
|
|
import (
|
|
capsulewebhook "github.com/projectcapsule/capsule/pkg/webhook"
|
|
)
|
|
|
|
type customResourcesHandler struct {
|
|
handlers []capsulewebhook.Handler
|
|
}
|
|
|
|
func CustomResources(handlers ...capsulewebhook.Handler) capsulewebhook.Webhook {
|
|
return &customResourcesHandler{handlers: handlers}
|
|
}
|
|
|
|
func (w *customResourcesHandler) GetHandlers() []capsulewebhook.Handler {
|
|
return w.handlers
|
|
}
|
|
|
|
func (w *customResourcesHandler) GetPath() string {
|
|
return "/customresources"
|
|
}
|