Documentation
¶
Index ¶
- func ControllerRingForRequest(ctx context.Context, c client.Reader) (*shardingv1alpha1.ControllerRing, error)
- func ControllerRingForWebhookPath(requestPath string) (*shardingv1alpha1.ControllerRing, error)
- func NewContextWithRequestPath(ctx context.Context, r *http.Request) context.Context
- func RequestPathFromContext(ctx context.Context) (string, error)
- func WebhookPathForControllerRing(ring *shardingv1alpha1.ControllerRing) string
- type Handler
- type Metrics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ControllerRingForRequest ¶ added in v0.10.0
func ControllerRingForRequest(ctx context.Context, c client.Reader) (*shardingv1alpha1.ControllerRing, error)
ControllerRingForRequest returns the Ring object matching the requests' path.
func ControllerRingForWebhookPath ¶ added in v0.10.0
func ControllerRingForWebhookPath(requestPath string) (*shardingv1alpha1.ControllerRing, error)
ControllerRingForWebhookPath returns the ControllerRing that is associated with the given webhook handler path. It is the reverse of WebhookPathForControllerRing.
func NewContextWithRequestPath ¶
NewContextWithRequestPath augments the given context with the request's path.
func RequestPathFromContext ¶
RequestPathFromContext returns the request's path stored in the given context.
func WebhookPathForControllerRing ¶ added in v0.10.0
func WebhookPathForControllerRing(ring *shardingv1alpha1.ControllerRing) string
WebhookPathForControllerRing returns the webhook handler path that should be used for implementing the given ControllerRing. It is the reverse of ControllerRingForWebhookPath.
Types ¶
type Handler ¶
type Handler struct { Reader client.Reader Clock clock.PassiveClock Metrics Metrics }
Handler handles admission requests and invalidates the static token in Secret resources related to ServiceAccounts.
func (*Handler) AddToManager ¶
AddToManager adds Handler to the given manager.
type Metrics ¶ added in v0.10.0
type Metrics interface {
ObserveAssignment(controllerRingName string, gr metav1.GroupResource)
}