mirror of
https://github.com/kubernetes/sample-controller.git
synced 2026-02-15 00:07:52 +08:00
Automatic merge from submit-queue. Manual cherrypick of #65034 to 1.9: make json serializer case sensitive fixes partially https://github.com/kubernetes/kubernetes/issues/64612 This PR imports the latest jsoniterator library so that case sensitivity during unmarshalling is optional. The PR also sets Kubernetes json serializer to be case sensitive. **Release note**: ```release-note ACTION REQUIRED: Kubernetes JSON deserializer is now case-sensitive to restore compatibility with pre-1.8 servers. If your config files contains fields with wrong case, the config files will be now invalid. ``` /sig api-machinery /kind bug /assign caesarxuchao liggitt thockin sttts mbohlool Kubernetes-commit: f4cf484c2cb6056e28fb9759a3c913be3eed990a
15 lines
613 B
Go
15 lines
613 B
Go
package concurrent
|
|
|
|
import "context"
|
|
|
|
// Executor replace go keyword to start a new goroutine
|
|
// the goroutine should cancel itself if the context passed in has been cancelled
|
|
// the goroutine started by the executor, is owned by the executor
|
|
// we can cancel all executors owned by the executor just by stop the executor itself
|
|
// however Executor interface does not Stop method, the one starting and owning executor
|
|
// should use the concrete type of executor, instead of this interface.
|
|
type Executor interface {
|
|
// Go starts a new goroutine controlled by the context
|
|
Go(handler func(ctx context.Context))
|
|
}
|