Commit Graph

7 Commits

Author SHA1 Message Date
Antonin Bas
3c28f81659 Use generics for waitFor (delaying workqueue) in client-go
With this change, we can typically avoid an extra heap allocation when
calling AddAfter with a positive duration (which causes the creation of
a waitFor object). This is because workqueues are typically used with
string keys, and casting a string (or more generally, non-pointer types)
to an `interface{}` will cause an heap escape / allocation.

Ater this change, there is no longer any usage of `type t interface{}`,
which was creating some confusion after the switch to generics in the
workqueue package.

Co-authored-by: Quan Tian <quan.tian@broadcom.com>
Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>

Kubernetes-commit: 53ddffb55709857fec6bddbd5ca4ca1b03f7da97
2024-10-08 15:12:11 -07:00
Alvaro Aleman
d67dddfe90 Workqueue: Add generic versions that are properly typed
This change adds a generic version of the various workqueue types while
retaining compatibility for the existing exported symbols and constructors.
The generic variants are prefixed with `Typed` and the existing ones are
marked as deprecated to nudge people to transition without breaking
them.

Kubernetes-commit: 0c7370bb851c15825d30a516722139ccccca0cfc
2024-04-11 18:11:41 -04:00
austin ce
21b4553e44 Allow custom metric provider for retry metrics
Kubernetes-commit: a60624ffbc265d61b35cab16ea9ded485909f3ed
2023-03-10 17:48:10 -05:00
wojtekt
14a51589c3 Migratet to k8s.io/utils/clock in workqueue
Kubernetes-commit: 392292ba81964e6ee7badec360a800b1f8645f2f
2021-09-09 16:38:59 +02:00
Sergiusz Urbaniak
ee078c72e2 pkg/util/workqueue: delete deprecated metrics
This deletes deprecated metrics and simplifies registration.

Kubernetes-commit: 4532cfd85c00da6f64e03fcf05f5636adc1151c7
2019-05-13 13:22:08 +02:00
danielqsj
c270b352df Use prometheus conventions for workqueue metrics
Kubernetes-commit: b828bc1a50dfa29ab85248e5af6da5acb27189c1
2018-11-21 11:43:47 +08:00
danielqsj
d25d9a3c52 Fix typos like limitting
Kubernetes-commit: 3c055aa4b47232bf7d6b5d5a0901dae239e33c59
2018-12-04 11:01:40 +08:00