Watcher: notify the caller when the server closes the connection (#184)

* Watcher: Add onClosed event and callback

* Update the code generators to accept the onClose callback

* Re-generate API

* Update unit tests

* Fix unit test

* Watcher fixes/improvements:
- Run Task.Yield at the beginning to make sure we're running async
- Set Watching = false before invoking OnClosed, to make sure the callers see a consistent state.
This commit is contained in:
Frederik Carlier
2018-06-27 23:38:28 +02:00
committed by Brendan Burns
parent c1543b527e
commit bc1cb6205c
8 changed files with 601 additions and 140 deletions

View File

@@ -35,6 +35,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -55,6 +58,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, {{GetClassName operation}}> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
{{/.}}

View File

@@ -24,10 +24,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, {{GetClassName operation}}> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"{{GetPathExpression .}}";
return WatchObjectAsync<{{GetClassName operation}}>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<{{GetClassName operation}}>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
{{/.}}

View File

@@ -45,12 +45,15 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
/// <returns>
/// A <see cref="Task"/> which represents the asynchronous operation, and returns a new watcher.
/// </returns>
Task<Watcher<T>> WatchObjectAsync<T>(string path, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, string resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, T> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken));
Task<Watcher<T>> WatchObjectAsync<T>(string path, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, string resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, T> onEvent = null, Action<Exception> onError = null, Action onClosed = null, CancellationToken cancellationToken = default(CancellationToken));
}
}

View File

@@ -13,7 +13,7 @@ namespace k8s
public partial class Kubernetes
{
/// <inheritdoc/>
public async Task<Watcher<T>> WatchObjectAsync<T>(string path, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, string resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, T> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<Watcher<T>> WatchObjectAsync<T>(string path, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, string resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, T> onEvent = null, Action<Exception> onError = null, Action onClosed = null, CancellationToken cancellationToken = default(CancellationToken))
{
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
@@ -152,7 +152,7 @@ namespace k8s
var stream = await httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false);
StreamReader reader = new StreamReader(stream);
return new Watcher<T>(reader, onEvent, onError);
return new Watcher<T>(reader, onEvent, onError, onClosed);
}
}
}

View File

@@ -30,32 +30,81 @@ namespace k8s
private readonly CancellationTokenSource _cts;
private readonly StreamReader _streamReader;
private readonly Task _watcherLoop;
public Watcher(StreamReader streamReader, Action<WatchEventType, T> onEvent, Action<Exception> onError)
/// <summary>
/// Initializes a new instance of the <see cref="Watcher{T}"/> class.
/// </summary>
/// <param name="streamReader">
/// A <see cref="StreamReader"/> from which to read the events.
/// </param>
/// <param name="onEvent">
/// The action to invoke when the server sends a new event.
/// </param>
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
public Watcher(StreamReader streamReader, Action<WatchEventType, T> onEvent, Action<Exception> onError, Action onClosed = null)
{
_streamReader = streamReader;
OnEvent += onEvent;
OnError += onError;
OnClosed += onClosed;
_cts = new CancellationTokenSource();
_watcherLoop = this.WatcherLoop(_cts.Token);
}
var token = _cts.Token;
Task.Run(async () =>
/// <inheritdoc/>
public void Dispose()
{
_cts.Cancel();
_streamReader.Dispose();
}
/// <summary>
/// add/remove callbacks when any event raised from api server
/// </summary>
public event Action<WatchEventType, T> OnEvent;
/// <summary>
/// add/remove callbacks when any exception was caught during watching
/// </summary>
public event Action<Exception> OnError;
/// <summary>
/// The event which is raised when the server closes th econnection.
/// </summary>
public event Action OnClosed;
public class WatchEvent
{
public WatchEventType Type { get; set; }
public T Object { get; set; }
}
private async Task WatcherLoop(CancellationToken cancellationToken)
{
// Make sure we run async
await Task.Yield();
try
{
Watching = true;
string line;
while (!streamReader.EndOfStream)
// ReadLineAsync will return null when we've reached the end of the stream.
while ((line = await this._streamReader.ReadLineAsync().ConfigureAwait(false)) != null)
{
if (token.IsCancellationRequested)
if (cancellationToken.IsCancellationRequested)
{
return;
}
var line = await streamReader.ReadLineAsync();
try
{
var genericEvent = SafeJsonConvert.DeserializeObject<k8s.Watcher<KubernetesObject>.WatchEvent>(line);
@@ -87,31 +136,8 @@ namespace k8s
finally
{
Watching = false;
OnClosed?.Invoke();
}
}, token);
}
public void Dispose()
{
_cts.Cancel();
_streamReader.Dispose();
}
/// <summary>
/// add/remove callbacks when any event raised from api server
/// </summary>
public event Action<WatchEventType, T> OnEvent;
/// <summary>
/// add/remove callbacks when any exception was caught during watching
/// </summary>
public event Action<Exception> OnError;
public class WatchEvent
{
public WatchEventType Type { get; set; }
public T Object { get; set; }
}
}
@@ -124,17 +150,21 @@ namespace k8s
/// <param name="response">the api response</param>
/// <param name="onEvent">a callback when any event raised from api server</param>
/// <param name="onError">a callbak when any exception was caught during watching</param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <returns>a watch object</returns>
public static Watcher<T> Watch<T>(this HttpOperationResponse response,
Action<WatchEventType, T> onEvent,
Action<Exception> onError = null)
Action<Exception> onError = null,
Action onClosed = null)
{
if (!(response.Response.Content is WatcherDelegatingHandler.LineSeparatedHttpContent content))
{
throw new KubernetesClientException("not a watchable request or failed response");
}
return new Watcher<T>(content.StreamReader, onEvent, onError);
return new Watcher<T>(content.StreamReader, onEvent, onError, onClosed);
}
/// <summary>
@@ -144,12 +174,16 @@ namespace k8s
/// <param name="response">the api response</param>
/// <param name="onEvent">a callback when any event raised from api server</param>
/// <param name="onError">a callbak when any exception was caught during watching</param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <returns>a watch object</returns>
public static Watcher<T> Watch<T>(this HttpOperationResponse<T> response,
Action<WatchEventType, T> onEvent,
Action<Exception> onError = null)
Action<Exception> onError = null,
Action onClosed = null)
{
return Watch((HttpOperationResponse) response, onEvent, onError);
return Watch((HttpOperationResponse)response, onEvent, onError, onClosed);
}
}
}

View File

@@ -55,6 +55,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -76,6 +79,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1ConfigMap> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -125,6 +129,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -146,6 +153,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Endpoints> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -195,6 +203,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -216,6 +227,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Event> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -265,6 +277,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -286,6 +301,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1LimitRange> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -335,6 +351,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -356,6 +375,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1PersistentVolumeClaim> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -405,6 +425,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -426,6 +449,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Pod> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -475,6 +499,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -496,6 +523,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1PodTemplate> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -545,6 +573,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -566,6 +597,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1ReplicationController> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -615,6 +647,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -636,6 +671,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1ResourceQuota> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -685,6 +721,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -706,6 +745,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Secret> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -755,6 +795,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -776,6 +819,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1ServiceAccount> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -825,6 +869,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -846,6 +893,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Service> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -892,6 +940,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -912,6 +963,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Namespace> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -958,6 +1010,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -978,6 +1033,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Node> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -1024,6 +1080,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -1044,6 +1103,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1PersistentVolume> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -1090,6 +1150,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -1110,6 +1173,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1alpha1InitializerConfiguration> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -1156,6 +1220,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -1176,6 +1243,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1MutatingWebhookConfiguration> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -1222,6 +1290,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -1242,6 +1313,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1ValidatingWebhookConfiguration> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -1288,6 +1360,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -1308,6 +1383,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1CustomResourceDefinition> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -1354,6 +1430,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -1374,6 +1453,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1APIService> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -1420,6 +1500,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -1440,6 +1523,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1APIService> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -1489,6 +1573,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -1510,6 +1597,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1ControllerRevision> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -1559,6 +1647,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -1580,6 +1671,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1DaemonSet> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -1629,6 +1721,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -1650,6 +1745,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Deployment> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -1699,6 +1795,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -1720,6 +1819,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1ReplicaSet> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -1769,6 +1869,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -1790,6 +1893,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1StatefulSet> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -1839,6 +1943,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -1860,6 +1967,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1ControllerRevision> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -1909,6 +2017,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -1930,6 +2041,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1StatefulSet> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -1979,6 +2091,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -2000,6 +2115,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta2ControllerRevision> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -2049,6 +2165,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -2070,6 +2189,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta2DaemonSet> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -2119,6 +2239,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -2140,6 +2263,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta2ReplicaSet> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -2189,6 +2313,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -2210,6 +2337,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta2StatefulSet> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -2259,6 +2387,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -2280,6 +2411,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1HorizontalPodAutoscaler> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -2329,6 +2461,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -2350,6 +2485,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V2beta1HorizontalPodAutoscaler> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -2399,6 +2535,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -2420,6 +2559,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Job> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -2469,6 +2609,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -2490,6 +2633,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1CronJob> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -2539,6 +2683,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -2560,6 +2707,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V2alpha1CronJob> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -2606,6 +2754,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -2626,6 +2777,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1CertificateSigningRequest> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -2675,6 +2827,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -2696,6 +2851,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1Event> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -2745,6 +2901,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -2766,6 +2925,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1DaemonSet> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -2815,6 +2975,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -2836,6 +2999,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1Ingress> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -2885,6 +3049,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -2906,6 +3073,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1ReplicaSet> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -2955,6 +3123,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -2976,6 +3147,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1NetworkPolicy> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -3025,6 +3197,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -3046,6 +3221,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1PodDisruptionBudget> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -3092,6 +3268,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -3112,6 +3291,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1ClusterRoleBinding> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -3158,6 +3338,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -3178,6 +3361,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1ClusterRole> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -3227,6 +3411,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -3248,6 +3435,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1RoleBinding> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -3297,6 +3485,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -3318,6 +3509,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Role> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -3364,6 +3556,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -3384,6 +3579,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1alpha1ClusterRoleBinding> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -3430,6 +3626,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -3450,6 +3649,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1alpha1ClusterRole> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -3499,6 +3699,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -3520,6 +3723,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1alpha1RoleBinding> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -3569,6 +3773,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -3590,6 +3797,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1alpha1Role> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -3636,6 +3844,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -3656,6 +3867,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1ClusterRoleBinding> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -3702,6 +3914,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -3722,6 +3937,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1ClusterRole> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -3771,6 +3987,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -3792,6 +4011,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1RoleBinding> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -3841,6 +4061,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -3862,6 +4085,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1Role> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -3908,6 +4132,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -3928,6 +4155,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1alpha1PriorityClass> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -3977,6 +4205,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -3998,6 +4229,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1alpha1PodPreset> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -4044,6 +4276,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -4064,6 +4299,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1StorageClass> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -4110,6 +4346,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -4130,6 +4369,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1alpha1VolumeAttachment> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -4176,6 +4416,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -4196,6 +4439,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1StorageClass> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
@@ -4242,6 +4486,9 @@ namespace k8s
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
@@ -4262,6 +4509,7 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1VolumeAttachment> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
}

View File

@@ -24,10 +24,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1ConfigMap> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"api/v1/watch/namespaces/{@namespace}/configmaps/{name}";
return WatchObjectAsync<V1ConfigMap>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1ConfigMap>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -46,10 +47,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Endpoints> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"api/v1/watch/namespaces/{@namespace}/endpoints/{name}";
return WatchObjectAsync<V1Endpoints>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1Endpoints>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -68,10 +70,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Event> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"api/v1/watch/namespaces/{@namespace}/events/{name}";
return WatchObjectAsync<V1Event>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1Event>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -90,10 +93,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1LimitRange> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"api/v1/watch/namespaces/{@namespace}/limitranges/{name}";
return WatchObjectAsync<V1LimitRange>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1LimitRange>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -112,10 +116,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1PersistentVolumeClaim> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"api/v1/watch/namespaces/{@namespace}/persistentvolumeclaims/{name}";
return WatchObjectAsync<V1PersistentVolumeClaim>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1PersistentVolumeClaim>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -134,10 +139,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Pod> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"api/v1/watch/namespaces/{@namespace}/pods/{name}";
return WatchObjectAsync<V1Pod>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1Pod>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -156,10 +162,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1PodTemplate> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"api/v1/watch/namespaces/{@namespace}/podtemplates/{name}";
return WatchObjectAsync<V1PodTemplate>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1PodTemplate>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -178,10 +185,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1ReplicationController> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"api/v1/watch/namespaces/{@namespace}/replicationcontrollers/{name}";
return WatchObjectAsync<V1ReplicationController>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1ReplicationController>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -200,10 +208,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1ResourceQuota> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"api/v1/watch/namespaces/{@namespace}/resourcequotas/{name}";
return WatchObjectAsync<V1ResourceQuota>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1ResourceQuota>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -222,10 +231,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Secret> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"api/v1/watch/namespaces/{@namespace}/secrets/{name}";
return WatchObjectAsync<V1Secret>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1Secret>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -244,10 +254,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1ServiceAccount> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"api/v1/watch/namespaces/{@namespace}/serviceaccounts/{name}";
return WatchObjectAsync<V1ServiceAccount>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1ServiceAccount>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -266,10 +277,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Service> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"api/v1/watch/namespaces/{@namespace}/services/{name}";
return WatchObjectAsync<V1Service>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1Service>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -287,10 +299,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Namespace> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"api/v1/watch/namespaces/{name}";
return WatchObjectAsync<V1Namespace>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1Namespace>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -308,10 +321,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Node> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"api/v1/watch/nodes/{name}";
return WatchObjectAsync<V1Node>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1Node>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -329,10 +343,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1PersistentVolume> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"api/v1/watch/persistentvolumes/{name}";
return WatchObjectAsync<V1PersistentVolume>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1PersistentVolume>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -350,10 +365,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1alpha1InitializerConfiguration> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/admissionregistration.k8s.io/v1alpha1/watch/initializerconfigurations/{name}";
return WatchObjectAsync<V1alpha1InitializerConfiguration>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1alpha1InitializerConfiguration>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -371,10 +387,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1MutatingWebhookConfiguration> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/admissionregistration.k8s.io/v1beta1/watch/mutatingwebhookconfigurations/{name}";
return WatchObjectAsync<V1beta1MutatingWebhookConfiguration>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1MutatingWebhookConfiguration>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -392,10 +409,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1ValidatingWebhookConfiguration> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/admissionregistration.k8s.io/v1beta1/watch/validatingwebhookconfigurations/{name}";
return WatchObjectAsync<V1beta1ValidatingWebhookConfiguration>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1ValidatingWebhookConfiguration>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -413,10 +431,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1CustomResourceDefinition> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/apiextensions.k8s.io/v1beta1/watch/customresourcedefinitions/{name}";
return WatchObjectAsync<V1beta1CustomResourceDefinition>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1CustomResourceDefinition>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -434,10 +453,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1APIService> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/apiregistration.k8s.io/v1/watch/apiservices/{name}";
return WatchObjectAsync<V1APIService>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1APIService>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -455,10 +475,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1APIService> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/apiregistration.k8s.io/v1beta1/watch/apiservices/{name}";
return WatchObjectAsync<V1beta1APIService>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1APIService>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -477,10 +498,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1ControllerRevision> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/apps/v1/watch/namespaces/{@namespace}/controllerrevisions/{name}";
return WatchObjectAsync<V1ControllerRevision>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1ControllerRevision>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -499,10 +521,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1DaemonSet> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/apps/v1/watch/namespaces/{@namespace}/daemonsets/{name}";
return WatchObjectAsync<V1DaemonSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1DaemonSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -521,10 +544,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Deployment> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/apps/v1/watch/namespaces/{@namespace}/deployments/{name}";
return WatchObjectAsync<V1Deployment>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1Deployment>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -543,10 +567,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1ReplicaSet> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/apps/v1/watch/namespaces/{@namespace}/replicasets/{name}";
return WatchObjectAsync<V1ReplicaSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1ReplicaSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -565,10 +590,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1StatefulSet> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/apps/v1/watch/namespaces/{@namespace}/statefulsets/{name}";
return WatchObjectAsync<V1StatefulSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1StatefulSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -587,10 +613,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1ControllerRevision> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/apps/v1beta1/watch/namespaces/{@namespace}/controllerrevisions/{name}";
return WatchObjectAsync<V1beta1ControllerRevision>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1ControllerRevision>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -609,10 +636,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1StatefulSet> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/apps/v1beta1/watch/namespaces/{@namespace}/statefulsets/{name}";
return WatchObjectAsync<V1beta1StatefulSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1StatefulSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -631,10 +659,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta2ControllerRevision> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/apps/v1beta2/watch/namespaces/{@namespace}/controllerrevisions/{name}";
return WatchObjectAsync<V1beta2ControllerRevision>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta2ControllerRevision>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -653,10 +682,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta2DaemonSet> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/apps/v1beta2/watch/namespaces/{@namespace}/daemonsets/{name}";
return WatchObjectAsync<V1beta2DaemonSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta2DaemonSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -675,10 +705,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta2ReplicaSet> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/apps/v1beta2/watch/namespaces/{@namespace}/replicasets/{name}";
return WatchObjectAsync<V1beta2ReplicaSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta2ReplicaSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -697,10 +728,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta2StatefulSet> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/apps/v1beta2/watch/namespaces/{@namespace}/statefulsets/{name}";
return WatchObjectAsync<V1beta2StatefulSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta2StatefulSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -719,10 +751,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1HorizontalPodAutoscaler> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/autoscaling/v1/watch/namespaces/{@namespace}/horizontalpodautoscalers/{name}";
return WatchObjectAsync<V1HorizontalPodAutoscaler>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1HorizontalPodAutoscaler>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -741,10 +774,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V2beta1HorizontalPodAutoscaler> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/autoscaling/v2beta1/watch/namespaces/{@namespace}/horizontalpodautoscalers/{name}";
return WatchObjectAsync<V2beta1HorizontalPodAutoscaler>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V2beta1HorizontalPodAutoscaler>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -763,10 +797,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Job> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/batch/v1/watch/namespaces/{@namespace}/jobs/{name}";
return WatchObjectAsync<V1Job>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1Job>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -785,10 +820,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1CronJob> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/batch/v1beta1/watch/namespaces/{@namespace}/cronjobs/{name}";
return WatchObjectAsync<V1beta1CronJob>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1CronJob>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -807,10 +843,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V2alpha1CronJob> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/batch/v2alpha1/watch/namespaces/{@namespace}/cronjobs/{name}";
return WatchObjectAsync<V2alpha1CronJob>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V2alpha1CronJob>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -828,10 +865,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1CertificateSigningRequest> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/certificates.k8s.io/v1beta1/watch/certificatesigningrequests/{name}";
return WatchObjectAsync<V1beta1CertificateSigningRequest>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1CertificateSigningRequest>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -850,10 +888,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1Event> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/events.k8s.io/v1beta1/watch/namespaces/{@namespace}/events/{name}";
return WatchObjectAsync<V1beta1Event>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1Event>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -872,10 +911,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1DaemonSet> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/extensions/v1beta1/watch/namespaces/{@namespace}/daemonsets/{name}";
return WatchObjectAsync<V1beta1DaemonSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1DaemonSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -894,10 +934,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1Ingress> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/extensions/v1beta1/watch/namespaces/{@namespace}/ingresses/{name}";
return WatchObjectAsync<V1beta1Ingress>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1Ingress>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -916,10 +957,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1ReplicaSet> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/extensions/v1beta1/watch/namespaces/{@namespace}/replicasets/{name}";
return WatchObjectAsync<V1beta1ReplicaSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1ReplicaSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -938,10 +980,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1NetworkPolicy> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/networking.k8s.io/v1/watch/namespaces/{@namespace}/networkpolicies/{name}";
return WatchObjectAsync<V1NetworkPolicy>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1NetworkPolicy>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -960,10 +1003,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1PodDisruptionBudget> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/policy/v1beta1/watch/namespaces/{@namespace}/poddisruptionbudgets/{name}";
return WatchObjectAsync<V1beta1PodDisruptionBudget>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1PodDisruptionBudget>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -981,10 +1025,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1ClusterRoleBinding> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/rbac.authorization.k8s.io/v1/watch/clusterrolebindings/{name}";
return WatchObjectAsync<V1ClusterRoleBinding>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1ClusterRoleBinding>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -1002,10 +1047,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1ClusterRole> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/rbac.authorization.k8s.io/v1/watch/clusterroles/{name}";
return WatchObjectAsync<V1ClusterRole>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1ClusterRole>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -1024,10 +1070,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1RoleBinding> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/rbac.authorization.k8s.io/v1/watch/namespaces/{@namespace}/rolebindings/{name}";
return WatchObjectAsync<V1RoleBinding>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1RoleBinding>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -1046,10 +1093,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1Role> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/rbac.authorization.k8s.io/v1/watch/namespaces/{@namespace}/roles/{name}";
return WatchObjectAsync<V1Role>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1Role>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -1067,10 +1115,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1alpha1ClusterRoleBinding> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/rbac.authorization.k8s.io/v1alpha1/watch/clusterrolebindings/{name}";
return WatchObjectAsync<V1alpha1ClusterRoleBinding>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1alpha1ClusterRoleBinding>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -1088,10 +1137,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1alpha1ClusterRole> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/rbac.authorization.k8s.io/v1alpha1/watch/clusterroles/{name}";
return WatchObjectAsync<V1alpha1ClusterRole>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1alpha1ClusterRole>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -1110,10 +1160,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1alpha1RoleBinding> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/rbac.authorization.k8s.io/v1alpha1/watch/namespaces/{@namespace}/rolebindings/{name}";
return WatchObjectAsync<V1alpha1RoleBinding>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1alpha1RoleBinding>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -1132,10 +1183,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1alpha1Role> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/rbac.authorization.k8s.io/v1alpha1/watch/namespaces/{@namespace}/roles/{name}";
return WatchObjectAsync<V1alpha1Role>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1alpha1Role>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -1153,10 +1205,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1ClusterRoleBinding> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/rbac.authorization.k8s.io/v1beta1/watch/clusterrolebindings/{name}";
return WatchObjectAsync<V1beta1ClusterRoleBinding>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1ClusterRoleBinding>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -1174,10 +1227,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1ClusterRole> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/rbac.authorization.k8s.io/v1beta1/watch/clusterroles/{name}";
return WatchObjectAsync<V1beta1ClusterRole>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1ClusterRole>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -1196,10 +1250,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1RoleBinding> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{@namespace}/rolebindings/{name}";
return WatchObjectAsync<V1beta1RoleBinding>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1RoleBinding>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -1218,10 +1273,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1Role> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{@namespace}/roles/{name}";
return WatchObjectAsync<V1beta1Role>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1Role>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -1239,10 +1295,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1alpha1PriorityClass> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/scheduling.k8s.io/v1alpha1/watch/priorityclasses/{name}";
return WatchObjectAsync<V1alpha1PriorityClass>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1alpha1PriorityClass>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -1261,10 +1318,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1alpha1PodPreset> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/settings.k8s.io/v1alpha1/watch/namespaces/{@namespace}/podpresets/{name}";
return WatchObjectAsync<V1alpha1PodPreset>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1alpha1PodPreset>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -1282,10 +1340,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1StorageClass> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/storage.k8s.io/v1/watch/storageclasses/{name}";
return WatchObjectAsync<V1StorageClass>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1StorageClass>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -1303,10 +1362,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1alpha1VolumeAttachment> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/storage.k8s.io/v1alpha1/watch/volumeattachments/{name}";
return WatchObjectAsync<V1alpha1VolumeAttachment>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1alpha1VolumeAttachment>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -1324,10 +1384,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1StorageClass> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/storage.k8s.io/v1beta1/watch/storageclasses/{name}";
return WatchObjectAsync<V1beta1StorageClass>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1StorageClass>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
@@ -1345,10 +1406,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1VolumeAttachment> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/storage.k8s.io/v1beta1/watch/volumeattachments/{name}";
return WatchObjectAsync<V1beta1VolumeAttachment>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1VolumeAttachment>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
}

View File

@@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
@@ -86,6 +88,7 @@ namespace k8s.Tests
{
AsyncCountdownEvent eventsReceived = new AsyncCountdownEvent(4 /* first line of response is eaten by WatcherDelegatingHandler */);
AsyncManualResetEvent serverShutdown = new AsyncManualResetEvent();
AsyncManualResetEvent connectionClosed = new AsyncManualResetEvent();
using (var server =
new MockKubeApiServer(
@@ -130,7 +133,8 @@ namespace k8s.Tests
errors += 1;
eventsReceived.Signal();
}
},
onClosed: connectionClosed.Set
);
// wait server yields all events
@@ -150,12 +154,16 @@ namespace k8s.Tests
// Let the server know it can initiate a shut down.
serverShutdown.Set();
await Task.WhenAny(connectionClosed.WaitAsync(), Task.Delay(TestTimeout));
Assert.True(connectionClosed.IsSet);
}
}
[Fact]
public async Task DisposeWatch()
{
var connectionClosed = new AsyncManualResetEvent();
var eventsReceived = new AsyncCountdownEvent(1);
bool serverRunning = true;
@@ -185,7 +193,8 @@ namespace k8s.Tests
{
events.Add(type);
eventsReceived.Signal();
}
},
onClosed: connectionClosed.Set
);
// wait at least an event
@@ -207,13 +216,14 @@ namespace k8s.Tests
var timeout = Task.Delay(TestTimeout);
while(!timeout.IsCompleted && watcher.Watching)
while (!timeout.IsCompleted && watcher.Watching)
{
await Task.Yield();
}
Assert.Empty(events);
Assert.False(watcher.Watching);
Assert.True(connectionClosed.IsSet);
}
}
@@ -222,6 +232,7 @@ namespace k8s.Tests
{
AsyncCountdownEvent eventsReceived = new AsyncCountdownEvent(4 /* first line of response is eaten by WatcherDelegatingHandler */);
AsyncManualResetEvent serverShutdown = new AsyncManualResetEvent();
var waitForClosed = new AsyncManualResetEvent(false);
using (var server = new MockKubeApiServer(testOutput, async httpContext =>
{
@@ -260,7 +271,8 @@ namespace k8s.Tests
errors += 1;
eventsReceived.Signal();
}
},
onClosed: waitForClosed.Set
);
// wait server yields all events
@@ -281,6 +293,10 @@ namespace k8s.Tests
Assert.True(watcher.Watching);
serverShutdown.Set();
await Task.WhenAny(waitForClosed.WaitAsync(), Task.Delay(TestTimeout));
Assert.True(waitForClosed.IsSet);
Assert.False(watcher.Watching);
}
}
@@ -289,6 +305,7 @@ namespace k8s.Tests
{
AsyncCountdownEvent eventsReceived = new AsyncCountdownEvent(4 /* first line of response is eaten by WatcherDelegatingHandler */);
AsyncManualResetEvent serverShutdown = new AsyncManualResetEvent();
AsyncManualResetEvent connectionClosed = new AsyncManualResetEvent();
using (var server = new MockKubeApiServer(testOutput, async httpContext =>
{
@@ -328,7 +345,8 @@ namespace k8s.Tests
errors += 1;
eventsReceived.Signal();
}
},
onClosed: connectionClosed.Set
);
// wait server yields all events
@@ -349,6 +367,9 @@ namespace k8s.Tests
Assert.True(watcher.Watching);
serverShutdown.Set();
await Task.WhenAny(connectionClosed.WaitAsync(), Task.Delay(TestTimeout));
Assert.True(connectionClosed.IsSet);
}
}
@@ -358,6 +379,8 @@ namespace k8s.Tests
Exception exceptionCatched = null;
var exceptionReceived = new AsyncManualResetEvent(false);
var waitForException = new AsyncManualResetEvent(false);
var waitForClosed = new AsyncManualResetEvent(false);
using (var server = new MockKubeApiServer(testOutput, async httpContext =>
{
await WriteStreamLine(httpContext, MockKubeApiServer.MockPodResponse);
@@ -375,12 +398,13 @@ namespace k8s.Tests
waitForException.Set();
Watcher<V1Pod> watcher;
watcher = listTask.Watch<V1Pod>(
(type, item) => { },
e =>
onEvent: (type, item) => { },
onError: e =>
{
exceptionCatched = e;
exceptionReceived.Set();
});
},
onClosed: waitForClosed.Set);
// wait server down
await Task.WhenAny(exceptionReceived.WaitAsync(), Task.Delay(TestTimeout));
@@ -390,6 +414,8 @@ namespace k8s.Tests
"Timed out waiting for exception"
);
await Task.WhenAny(waitForClosed.WaitAsync(), Task.Delay(TestTimeout));
Assert.True(waitForClosed.IsSet);
Assert.False(watcher.Watching);
Assert.IsType<IOException>(exceptionCatched);
}
@@ -468,6 +494,7 @@ namespace k8s.Tests
{
AsyncCountdownEvent eventsReceived = new AsyncCountdownEvent(4);
AsyncManualResetEvent serverShutdown = new AsyncManualResetEvent();
AsyncManualResetEvent connectionClosed = new AsyncManualResetEvent();
using (var server = new MockKubeApiServer(testOutput, async httpContext =>
{
@@ -507,7 +534,8 @@ namespace k8s.Tests
errors += 1;
eventsReceived.Signal();
}
},
onClosed: connectionClosed.Set
);
// wait server yields all events
@@ -528,10 +556,91 @@ namespace k8s.Tests
Assert.True(watcher.Watching);
serverShutdown.Set();
await Task.WhenAny(connectionClosed.WaitAsync(), Task.Delay(TestTimeout));
Assert.True(connectionClosed.IsSet);
}
}
[Fact (Skip = "https://github.com/kubernetes-client/csharp/issues/165")]
[Fact(Skip = "Integration Test")]
public async Task WatcherIntegrationTest()
{
var kubernetesConfig = KubernetesClientConfiguration.BuildConfigFromConfigFile(kubeconfigPath: @"C:\Users\frede\Source\Repos\cloud\minikube.config");
var kubernetes = new Kubernetes(kubernetesConfig);
var job = await kubernetes.CreateNamespacedJobAsync(
new V1Job()
{
ApiVersion = "batch/v1",
Kind = V1Job.KubeKind,
Metadata = new V1ObjectMeta()
{
Name = nameof(WatcherIntegrationTest).ToLowerInvariant()
},
Spec = new V1JobSpec()
{
Template = new V1PodTemplateSpec()
{
Spec = new V1PodSpec()
{
Containers = new List<V1Container>()
{
new V1Container()
{
Image = "ubuntu/xenial",
Name = "runner",
Command = new List<string>()
{
"/bin/bash",
"-c",
"--"
},
Args = new List<string>()
{
"trap : TERM INT; sleep infinity & wait"
}
}
},
RestartPolicy = "Never"
},
}
}
},
"default");
Collection<Tuple<WatchEventType, V1Job>> events = new Collection<Tuple<WatchEventType, V1Job>>();
AsyncManualResetEvent started = new AsyncManualResetEvent();
AsyncManualResetEvent connectionClosed = new AsyncManualResetEvent();
var watcher = await kubernetes.WatchNamespacedJobAsync(
job.Metadata.Name,
job.Metadata.NamespaceProperty,
job.Metadata.ResourceVersion,
timeoutSeconds: 30,
onEvent:
(type, source) =>
{
Debug.WriteLine($"Watcher 1: {type}, {source}");
events.Add(new Tuple<WatchEventType, V1Job>(type, source));
job = source;
started.Set();
},
onClosed: connectionClosed.Set).ConfigureAwait(false);
await started.WaitAsync();
await Task.WhenAny(connectionClosed.WaitAsync(), Task.Delay(TimeSpan.FromMinutes(3)));
Assert.True(connectionClosed.IsSet);
await kubernetes.DeleteNamespacedJobAsync(
new V1DeleteOptions(),
job.Metadata.Name,
job.Metadata.NamespaceProperty);
}
[Fact(Skip = "https://github.com/kubernetes-client/csharp/issues/165")]
public async Task DirectWatchEventsWithTimeout()
{
AsyncCountdownEvent eventsReceived = new AsyncCountdownEvent(4);