mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-04 10:41:14 +00:00
This will
Add:
- golang.org/x/time
upgrade:
- k8s.io/client-go v8.0.0
- k8s.io/api version to kubernetes-1.11.0
- k8s.io/apimachinery version to kubernetes-1.11.0
- github.com/json-iterator/go version to latest because `https://github.com/kubernetes/kubernetes/issues/64612`
delete:
- vendor/github.com/juju/ratelimit because k8s-client-go is shifted to golang.org/x/time
Please refer: acc52496ce
```
gvt delete k8s.io/client-go
gvt delete k8s.io/api
gvt delete k8s.io/apimachinery
gvt delete github.com/json-iterator/go
gvt delete github.com/juju/ratelimit
gvt fetch --no-recurse -tag v8.0.0 k8s.io/client-go
gvt fetch --no-recurse -tag kubernetes-1.11.0 k8s.io/api
gvt fetch --no-recurse -tag kubernetes-1.11.0 k8s.io/apimachinery
gvt fetch github.com/json-iterator/go
gvt fetch golang.org/x/time
```
fixes: #3284
Signed-off-by: Satyam Zode <satyamzode@gmail.com>
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))
|
|
}
|