Show / Hide Table of Contents

Interface ILock

ILock offers a common interface for locking on arbitrary resources used in leader election. The Interface is used to hide the details on specific implementations in order to allow them to change over time.

Namespace: k8s.LeaderElection
Assembly: KubernetesClient.dll
Syntax
public interface ILock

Properties

View Source

Identity

the locks Identity

Declaration
string Identity { get; }
Property Value
Type Description
string

Methods

View Source

CreateAsync(LeaderElectionRecord, CancellationToken)

Create attempts to create a LeaderElectionRecord

Declaration
Task<bool> CreateAsync(LeaderElectionRecord record, CancellationToken cancellationToken = default)
Parameters
Type Name Description
LeaderElectionRecord record

record to create

CancellationToken cancellationToken

token to cancel the task

Returns
Type Description
Task<bool>

true if created

View Source

Describe()

Describe is used to convert details on current resource lock into a string

Declaration
string Describe()
Returns
Type Description
string

resource lock description

View Source

GetAsync(CancellationToken)

Get returns the LeaderElectionRecord

Declaration
Task<LeaderElectionRecord> GetAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

token to cancel the task

Returns
Type Description
Task<LeaderElectionRecord>

the record

View Source

UpdateAsync(LeaderElectionRecord, CancellationToken)

Update will update and existing LeaderElectionRecord

Declaration
Task<bool> UpdateAsync(LeaderElectionRecord record, CancellationToken cancellationToken = default)
Parameters
Type Name Description
LeaderElectionRecord record

record to create

CancellationToken cancellationToken

token to cancel the task

Returns
Type Description
Task<bool>

true if updated

  • View Source
In this article
Back to top Generated by DocFX