mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-11 06:02:18 +00:00
Add ctx to registry interfaces
This commit is contained in:
@@ -24,5 +24,5 @@ import (
|
||||
type Registry interface {
|
||||
// ApplyBinding should apply the binding. That is, it should actually
|
||||
// assign or place pod binding.PodID on machine binding.Host.
|
||||
ApplyBinding(binding *api.Binding) error
|
||||
ApplyBinding(ctx api.Context, binding *api.Binding) error
|
||||
}
|
||||
|
@@ -67,7 +67,7 @@ func (b *REST) Create(ctx api.Context, obj runtime.Object) (<-chan runtime.Objec
|
||||
return nil, fmt.Errorf("incorrect type: %#v", obj)
|
||||
}
|
||||
return apiserver.MakeAsync(func() (runtime.Object, error) {
|
||||
if err := b.registry.ApplyBinding(binding); err != nil {
|
||||
if err := b.registry.ApplyBinding(ctx, binding); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &api.Status{Status: api.StatusSuccess}, nil
|
||||
|
Reference in New Issue
Block a user