mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-08 18:39:16 +00:00
Pass context to tryAcquireOrRenew
Kubernetes-commit: c049f30ef2a83172f46a587ddaf2104b39df8301
This commit is contained in:
committed by
Kubernetes Publisher
parent
200280e336
commit
d6bfb32c17
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package resourcelock
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -73,13 +74,13 @@ type ResourceLockConfig struct {
|
||||
// by the leaderelection code.
|
||||
type Interface interface {
|
||||
// Get returns the LeaderElectionRecord
|
||||
Get() (*LeaderElectionRecord, []byte, error)
|
||||
Get(ctx context.Context) (*LeaderElectionRecord, []byte, error)
|
||||
|
||||
// Create attempts to create a LeaderElectionRecord
|
||||
Create(ler LeaderElectionRecord) error
|
||||
Create(ctx context.Context, ler LeaderElectionRecord) error
|
||||
|
||||
// Update will update and existing LeaderElectionRecord
|
||||
Update(ler LeaderElectionRecord) error
|
||||
Update(ctx context.Context, ler LeaderElectionRecord) error
|
||||
|
||||
// RecordEvent is used to record events
|
||||
RecordEvent(string)
|
||||
|
Reference in New Issue
Block a user