Auto-generate Watcher code (for individual objects) (#148)
* Only keep WatchObjectAsync<T> in the manually-generated code * Add a console application which can generate the various Watch methods * Generate the Watch methods * Use Nustache and templates to generate the watcher code * Re-generate code
This commit is contained in:
committed by
Brendan Burns
parent
29a9c22644
commit
ebf8661641
62
gen/KubernetesWatchGenerator/IKubernetes.Watch.cs.template
Normal file
62
gen/KubernetesWatchGenerator/IKubernetes.Watch.cs.template
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
using k8s.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace k8s
|
||||||
|
{
|
||||||
|
public partial interface IKubernetes
|
||||||
|
{
|
||||||
|
{{#.}}
|
||||||
|
/// <summary>
|
||||||
|
/// {{ToXmlDoc operation.description}}
|
||||||
|
/// </summary>
|
||||||
|
{{#operation.actualParameters}}
|
||||||
|
{{#isRequired}}
|
||||||
|
/// <param name="{{name}}">
|
||||||
|
/// {{ToXmlDoc description}}
|
||||||
|
/// </param>
|
||||||
|
{{/isRequired}}
|
||||||
|
{{/operation.actualParameters}}
|
||||||
|
{{#operation.actualParameters}}
|
||||||
|
{{^isRequired}}
|
||||||
|
/// <param name="{{name}}">
|
||||||
|
/// {{ToXmlDoc description}}
|
||||||
|
/// </param>
|
||||||
|
{{/isRequired}}
|
||||||
|
{{/operation.actualParameters}}
|
||||||
|
/// <param name="customHeaders">
|
||||||
|
/// The headers that will be added to request.
|
||||||
|
/// </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="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<{{ClassName operation}}>> {{MethodName operation}}(
|
||||||
|
{{#operation.actualParameters}}
|
||||||
|
{{#isRequired}}
|
||||||
|
{{GetDotNetType type name isRequired}} {{GetDotNetName name}},
|
||||||
|
{{/isRequired}}
|
||||||
|
{{/operation.actualParameters}}
|
||||||
|
{{#operation.actualParameters}}
|
||||||
|
{{^isRequired}}
|
||||||
|
{{GetDotNetType .}} {{GetDotNetName .}} = null,
|
||||||
|
{{/isRequired}}
|
||||||
|
{{/operation.actualParameters}}
|
||||||
|
Dictionary<string, List<string>> customHeaders = null,
|
||||||
|
Action<WatchEventType, {{ClassName operation}}> onEvent = null,
|
||||||
|
Action<Exception> onError = null,
|
||||||
|
CancellationToken cancellationToken = default(CancellationToken));
|
||||||
|
|
||||||
|
{{/.}}
|
||||||
|
}
|
||||||
|
}
|
||||||
35
gen/KubernetesWatchGenerator/Kubernetes.Watch.cs.template
Normal file
35
gen/KubernetesWatchGenerator/Kubernetes.Watch.cs.template
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
using k8s.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace k8s
|
||||||
|
{
|
||||||
|
public partial class Kubernetes
|
||||||
|
{
|
||||||
|
{{#.}}
|
||||||
|
/// <inheritdoc>
|
||||||
|
public Task<Watcher<{{ClassName operation}}>> {{MethodName operation}}(
|
||||||
|
{{#operation.actualParameters}}
|
||||||
|
{{#isRequired}}
|
||||||
|
{{GetDotNetType type name isRequired}} {{GetDotNetName name}},
|
||||||
|
{{/isRequired}}
|
||||||
|
{{/operation.actualParameters}}
|
||||||
|
{{#operation.actualParameters}}
|
||||||
|
{{^isRequired}}
|
||||||
|
{{GetDotNetType .}} {{GetDotNetName .}} = null,
|
||||||
|
{{/isRequired}}
|
||||||
|
{{/operation.actualParameters}}
|
||||||
|
Dictionary<string, List<string>> customHeaders = null,
|
||||||
|
Action<WatchEventType, {{ClassName operation}}> onEvent = null,
|
||||||
|
Action<Exception> onError = null,
|
||||||
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
|
{
|
||||||
|
string path = $"{{GetPathExpression .}}";
|
||||||
|
return WatchObjectAsync<{{ClassName 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
{{/.}}
|
||||||
|
}
|
||||||
|
}
|
||||||
31
gen/KubernetesWatchGenerator/KubernetesWatchGenerator.csproj
Normal file
31
gen/KubernetesWatchGenerator/KubernetesWatchGenerator.csproj
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
|
<PackageReference Include="NSwag.Core" Version="11.17.2" />
|
||||||
|
<PackageReference Include="Nustache" Version="1.16.0.8" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="Kubernetes.Watch.cs.template">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="IKubernetes.Watch.cs.template">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
251
gen/KubernetesWatchGenerator/Program.cs
Normal file
251
gen/KubernetesWatchGenerator/Program.cs
Normal file
@@ -0,0 +1,251 @@
|
|||||||
|
using NJsonSchema;
|
||||||
|
using NSwag;
|
||||||
|
using Nustache.Core;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace KubernetesWatchGenerator
|
||||||
|
{
|
||||||
|
class Program
|
||||||
|
{
|
||||||
|
static async Task Main(string[] args)
|
||||||
|
{
|
||||||
|
// Initialize variables - such as the Kubernetes branch for which to generate the API.
|
||||||
|
string kubernetesBranch = "v1.10.0";
|
||||||
|
|
||||||
|
if (Environment.GetEnvironmentVariable("KUBERNETES_BRANCH") != null)
|
||||||
|
{
|
||||||
|
kubernetesBranch = Environment.GetEnvironmentVariable("KUBERNETES_BRANCH");
|
||||||
|
|
||||||
|
Console.WriteLine($"Using Kubernetes branch {kubernetesBranch}, as set by the KUBERNETES_BRANCH environment variable");
|
||||||
|
}
|
||||||
|
|
||||||
|
const string outputDirectory = "../../../../../src/KubernetesClient/generated/";
|
||||||
|
|
||||||
|
var specUrl = $"https://raw.githubusercontent.com/kubernetes/kubernetes/{kubernetesBranch}/api/openapi-spec/swagger.json";
|
||||||
|
var specPath = $"{kubernetesBranch}-swagger.json";
|
||||||
|
|
||||||
|
// Download the Kubernetes spec, and cache it locally. Don't download it if already present in the cache.
|
||||||
|
if (!File.Exists(specPath))
|
||||||
|
{
|
||||||
|
HttpClient client = new HttpClient();
|
||||||
|
using (var response = await client.GetAsync(specUrl, HttpCompletionOption.ResponseHeadersRead))
|
||||||
|
using (var stream = await response.Content.ReadAsStreamAsync())
|
||||||
|
using (var output = File.Open(specPath, FileMode.Create, FileAccess.ReadWrite))
|
||||||
|
{
|
||||||
|
await stream.CopyToAsync(output);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read the spec
|
||||||
|
var swagger = await SwaggerDocument.FromFileAsync(specPath);
|
||||||
|
|
||||||
|
// We skip operations where the name of the class in the C# client could not be determined correctly.
|
||||||
|
// That's usually because there are different version of the same object (e.g. for deployments).
|
||||||
|
Collection<string> blacklistedOperations = new Collection<string>()
|
||||||
|
{
|
||||||
|
"watchAppsV1beta1NamespacedDeployment",
|
||||||
|
"watchAppsV1beta2NamespacedDeployment",
|
||||||
|
"watchExtensionsV1beta1NamespacedDeployment",
|
||||||
|
"watchExtensionsV1beta1NamespacedNetworkPolicy",
|
||||||
|
"watchPolicyV1beta1PodSecurityPolicy",
|
||||||
|
"watchExtensionsV1beta1PodSecurityPolicy"
|
||||||
|
};
|
||||||
|
|
||||||
|
var watchOperations = swagger.Operations.Where(
|
||||||
|
o => o.Path.Contains("/watch/")
|
||||||
|
&& o.Operation.ActualParameters.Any(p => p.Name == "name")
|
||||||
|
&& !blacklistedOperations.Contains(o.Operation.OperationId)).ToArray();
|
||||||
|
|
||||||
|
// Register helpers used in the templating.
|
||||||
|
Helpers.Register(nameof(ToXmlDoc), ToXmlDoc);
|
||||||
|
Helpers.Register(nameof(ClassName), ClassName);
|
||||||
|
Helpers.Register(nameof(MethodName), MethodName);
|
||||||
|
Helpers.Register(nameof(GetDotNetName), GetDotNetName);
|
||||||
|
Helpers.Register(nameof(GetDotNetType), GetDotNetType);
|
||||||
|
Helpers.Register(nameof(GetPathExpression), GetPathExpression);
|
||||||
|
|
||||||
|
// Render.
|
||||||
|
Render.FileToFile("IKubernetes.Watch.cs.template", watchOperations, $"{outputDirectory}IKubernetes.Watch.cs");
|
||||||
|
Render.FileToFile("Kubernetes.Watch.cs.template", watchOperations, $"{outputDirectory}Kubernetes.Watch.cs");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ToXmlDoc(RenderContext context, IList<object> arguments, IDictionary<string, object> options, RenderBlock fn, RenderBlock inverse)
|
||||||
|
{
|
||||||
|
if (arguments != null && arguments.Count > 0 && arguments[0] != null && arguments[0] is string)
|
||||||
|
{
|
||||||
|
bool first = true;
|
||||||
|
|
||||||
|
using (StringReader reader = new StringReader(arguments[0] as string))
|
||||||
|
{
|
||||||
|
string line = null;
|
||||||
|
while ((line = reader.ReadLine()) != null)
|
||||||
|
{
|
||||||
|
if (!first)
|
||||||
|
{
|
||||||
|
context.Write(Environment.NewLine);
|
||||||
|
context.Write(" /// ");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
first = false;
|
||||||
|
}
|
||||||
|
context.Write(line);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void MethodName(RenderContext context, IList<object> arguments, IDictionary<string, object> options, RenderBlock fn, RenderBlock inverse)
|
||||||
|
{
|
||||||
|
if (arguments != null && arguments.Count > 0 && arguments[0] != null && arguments[0] is SwaggerOperation)
|
||||||
|
{
|
||||||
|
context.Write(MethodName(arguments[0] as SwaggerOperation));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static string MethodName(SwaggerOperation watchOperation)
|
||||||
|
{
|
||||||
|
var tag = watchOperation.Tags[0];
|
||||||
|
tag = tag.Replace("_", string.Empty);
|
||||||
|
|
||||||
|
var methodName = ToPascalCase(watchOperation.OperationId);
|
||||||
|
|
||||||
|
// This tries to remove the version from the method name, e.g. watchCoreV1NamespacedPod => WatchNamespacedPod
|
||||||
|
methodName = methodName.Replace(tag, string.Empty, StringComparison.OrdinalIgnoreCase);
|
||||||
|
methodName += "Async";
|
||||||
|
return methodName;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ClassName(RenderContext context, IList<object> arguments, IDictionary<string, object> options, RenderBlock fn, RenderBlock inverse)
|
||||||
|
{
|
||||||
|
if (arguments != null && arguments.Count > 0 && arguments[0] != null && arguments[0] is SwaggerOperation)
|
||||||
|
{
|
||||||
|
context.Write(ClassName(arguments[0] as SwaggerOperation));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static string ClassName(SwaggerOperation watchOperation)
|
||||||
|
{
|
||||||
|
var groupVersionKind = (Dictionary<string, object>)watchOperation.ExtensionData["x-kubernetes-group-version-kind"];
|
||||||
|
var group = (string)groupVersionKind["group"];
|
||||||
|
var kind = (string)groupVersionKind["kind"];
|
||||||
|
var version = (string)groupVersionKind["version"];
|
||||||
|
|
||||||
|
var className = $"{ToPascalCase(version)}{kind}";
|
||||||
|
return className;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void GetDotNetType(RenderContext context, IList<object> arguments, IDictionary<string, object> options, RenderBlock fn, RenderBlock inverse)
|
||||||
|
{
|
||||||
|
if (arguments != null && arguments.Count > 0 && arguments[0] != null && arguments[0] is SwaggerParameter)
|
||||||
|
{
|
||||||
|
var parameter = arguments[0] as SwaggerParameter;
|
||||||
|
context.Write(GetDotNetType(parameter.Type, parameter.Name, parameter.IsRequired));
|
||||||
|
}
|
||||||
|
else if(arguments != null && arguments.Count > 2 && arguments[0] != null && arguments[1] != null && arguments[2] != null && arguments[0] is JsonObjectType && arguments[1] is string && arguments[2] is bool)
|
||||||
|
{
|
||||||
|
context.Write(GetDotNetType((JsonObjectType)arguments[0], (string)arguments[1], (bool)arguments[2]));
|
||||||
|
}
|
||||||
|
else if(arguments != null && arguments.Count > 0 && arguments[0] != null)
|
||||||
|
{
|
||||||
|
context.Write($"ERROR: Expected SwaggerParameter but got {arguments[0].GetType().FullName}");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
context.Write($"ERROR: Expected a SwaggerParameter argument but got none.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string GetDotNetType(JsonObjectType jsonType, string name, bool required)
|
||||||
|
{
|
||||||
|
if (name == "pretty" && !required)
|
||||||
|
{
|
||||||
|
return "bool?";
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (jsonType)
|
||||||
|
{
|
||||||
|
case JsonObjectType.Boolean:
|
||||||
|
if (required)
|
||||||
|
{
|
||||||
|
return "bool";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "bool?";
|
||||||
|
}
|
||||||
|
|
||||||
|
case JsonObjectType.Integer:
|
||||||
|
if (required)
|
||||||
|
{
|
||||||
|
return "int";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "int?";
|
||||||
|
}
|
||||||
|
|
||||||
|
case JsonObjectType.String:
|
||||||
|
return "string";
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new NotSupportedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void GetDotNetName(RenderContext context, IList<object> arguments, IDictionary<string, object> options, RenderBlock fn, RenderBlock inverse)
|
||||||
|
{
|
||||||
|
if (arguments != null && arguments.Count > 0 && arguments[0] != null && arguments[0] is SwaggerParameter)
|
||||||
|
{
|
||||||
|
var parameter = arguments[0] as SwaggerParameter;
|
||||||
|
context.Write(GetDotNetName(parameter.Name));
|
||||||
|
}
|
||||||
|
else if (arguments != null && arguments.Count > 0 && arguments[0] != null && arguments[0] is string)
|
||||||
|
{
|
||||||
|
var parameter = arguments[0] as SwaggerParameter;
|
||||||
|
context.Write(GetDotNetName((string)arguments[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string GetDotNetName(string jsonName)
|
||||||
|
{
|
||||||
|
if (jsonName == "namespace")
|
||||||
|
{
|
||||||
|
return "@namespace";
|
||||||
|
}
|
||||||
|
else if (jsonName == "continue")
|
||||||
|
{
|
||||||
|
return "@continue";
|
||||||
|
}
|
||||||
|
|
||||||
|
return jsonName;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void GetPathExpression(RenderContext context, IList<object> arguments, IDictionary<string, object> options, RenderBlock fn, RenderBlock inverse)
|
||||||
|
{
|
||||||
|
if (arguments != null && arguments.Count > 0 && arguments[0] != null && arguments[0] is SwaggerOperationDescription)
|
||||||
|
{
|
||||||
|
var operation = arguments[0] as SwaggerOperationDescription;
|
||||||
|
context.Write(GetPathExpression(operation));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string GetPathExpression(SwaggerOperationDescription operation)
|
||||||
|
{
|
||||||
|
string pathExpression = operation.Path;
|
||||||
|
pathExpression = pathExpression.Replace("{namespace}", "{@namespace}");
|
||||||
|
return pathExpression;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string ToPascalCase(string name)
|
||||||
|
{
|
||||||
|
return char.ToUpper(name[0]) + name.Substring(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,38 +1,37 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 15
|
# Visual Studio 15
|
||||||
VisualStudioVersion = 15.0.26430.16
|
VisualStudioVersion = 15.0.26430.16
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{B70AFB57-57C9-46DC-84BE-11B7DDD34B40}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{B70AFB57-57C9-46DC-84BE-11B7DDD34B40}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "attach", "examples\attach\attach.csproj", "{87CD4259-88DC-4748-AC61-CDDFB6E02891}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "attach", "examples\attach\attach.csproj", "{87CD4259-88DC-4748-AC61-CDDFB6E02891}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "exec", "examples\exec\exec.csproj", "{0044011C-25A6-4303-AA3F-877244B51ABB}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "exec", "examples\exec\exec.csproj", "{0044011C-25A6-4303-AA3F-877244B51ABB}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "labels", "examples\labels\labels.csproj", "{D5471F2E-F522-47E7-B3D2-F98A4452E214}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "labels", "examples\labels\labels.csproj", "{D5471F2E-F522-47E7-B3D2-F98A4452E214}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "logs", "examples\logs\logs.csproj", "{4BD050E8-B0E4-40B4-AC72-5130D81095C7}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "logs", "examples\logs\logs.csproj", "{4BD050E8-B0E4-40B4-AC72-5130D81095C7}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "namespace", "examples\namespace\namespace.csproj", "{1AA79D75-E7C4-4C0C-928B-FB12EC3CBF68}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "namespace", "examples\namespace\namespace.csproj", "{1AA79D75-E7C4-4C0C-928B-FB12EC3CBF68}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "simple", "examples\simple\simple.csproj", "{DDB14203-DD5B-452A-A1E0-9FD98629101F}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "simple", "examples\simple\simple.csproj", "{DDB14203-DD5B-452A-A1E0-9FD98629101F}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "watch", "examples\watch\watch.csproj", "{1DDB0CCF-7CCE-4A60-BAC6-9AE1779DEDB5}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "watch", "examples\watch\watch.csproj", "{1DDB0CCF-7CCE-4A60-BAC6-9AE1779DEDB5}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3D1864AA-1FFC-4512-BB13-46055E410F73}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3D1864AA-1FFC-4512-BB13-46055E410F73}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KubernetesClient", "src\KubernetesClient\KubernetesClient.csproj", "{35DD7248-F9EC-4272-A32C-B0C59E5A6FA7}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KubernetesClient", "src\KubernetesClient\KubernetesClient.csproj", "{35DD7248-F9EC-4272-A32C-B0C59E5A6FA7}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{8AF4A5C2-F0CE-47D5-A4C5-FE4AB83CA509}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{8AF4A5C2-F0CE-47D5-A4C5-FE4AB83CA509}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KubernetesClient.Tests", "tests\KubernetesClient.Tests\KubernetesClient.Tests.csproj", "{806AD0E5-833F-42FB-A870-4BCEE7F4B17F}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KubernetesClient.Tests", "tests\KubernetesClient.Tests\KubernetesClient.Tests.csproj", "{806AD0E5-833F-42FB-A870-4BCEE7F4B17F}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{879F8787-C3BB-43F3-A92D-6D4C7D3A5285}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KubernetesWatchGenerator", "gen\KubernetesWatchGenerator\KubernetesWatchGenerator.csproj", "{542DC30E-FDF7-4A35-B026-6C21F435E8B1}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {049A763A-C891-4E8D-80CF-89DD3E22ADC7}
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
Debug|x64 = Debug|x64
|
Debug|x64 = Debug|x64
|
||||||
@@ -150,6 +149,21 @@ Global
|
|||||||
{806AD0E5-833F-42FB-A870-4BCEE7F4B17F}.Release|x64.Build.0 = Release|Any CPU
|
{806AD0E5-833F-42FB-A870-4BCEE7F4B17F}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{806AD0E5-833F-42FB-A870-4BCEE7F4B17F}.Release|x86.ActiveCfg = Release|Any CPU
|
{806AD0E5-833F-42FB-A870-4BCEE7F4B17F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{806AD0E5-833F-42FB-A870-4BCEE7F4B17F}.Release|x86.Build.0 = Release|Any CPU
|
{806AD0E5-833F-42FB-A870-4BCEE7F4B17F}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{542DC30E-FDF7-4A35-B026-6C21F435E8B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{542DC30E-FDF7-4A35-B026-6C21F435E8B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{542DC30E-FDF7-4A35-B026-6C21F435E8B1}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{542DC30E-FDF7-4A35-B026-6C21F435E8B1}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{542DC30E-FDF7-4A35-B026-6C21F435E8B1}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{542DC30E-FDF7-4A35-B026-6C21F435E8B1}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{542DC30E-FDF7-4A35-B026-6C21F435E8B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{542DC30E-FDF7-4A35-B026-6C21F435E8B1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{542DC30E-FDF7-4A35-B026-6C21F435E8B1}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{542DC30E-FDF7-4A35-B026-6C21F435E8B1}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{542DC30E-FDF7-4A35-B026-6C21F435E8B1}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{542DC30E-FDF7-4A35-B026-6C21F435E8B1}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(NestedProjects) = preSolution
|
GlobalSection(NestedProjects) = preSolution
|
||||||
{87CD4259-88DC-4748-AC61-CDDFB6E02891} = {B70AFB57-57C9-46DC-84BE-11B7DDD34B40}
|
{87CD4259-88DC-4748-AC61-CDDFB6E02891} = {B70AFB57-57C9-46DC-84BE-11B7DDD34B40}
|
||||||
@@ -161,5 +175,9 @@ Global
|
|||||||
{1DDB0CCF-7CCE-4A60-BAC6-9AE1779DEDB5} = {B70AFB57-57C9-46DC-84BE-11B7DDD34B40}
|
{1DDB0CCF-7CCE-4A60-BAC6-9AE1779DEDB5} = {B70AFB57-57C9-46DC-84BE-11B7DDD34B40}
|
||||||
{35DD7248-F9EC-4272-A32C-B0C59E5A6FA7} = {3D1864AA-1FFC-4512-BB13-46055E410F73}
|
{35DD7248-F9EC-4272-A32C-B0C59E5A6FA7} = {3D1864AA-1FFC-4512-BB13-46055E410F73}
|
||||||
{806AD0E5-833F-42FB-A870-4BCEE7F4B17F} = {8AF4A5C2-F0CE-47D5-A4C5-FE4AB83CA509}
|
{806AD0E5-833F-42FB-A870-4BCEE7F4B17F} = {8AF4A5C2-F0CE-47D5-A4C5-FE4AB83CA509}
|
||||||
|
{542DC30E-FDF7-4A35-B026-6C21F435E8B1} = {879F8787-C3BB-43F3-A92D-6D4C7D3A5285}
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {049A763A-C891-4E8D-80CF-89DD3E22ADC7}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using k8s.Models;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
@@ -9,21 +8,10 @@ namespace k8s
|
|||||||
public partial interface IKubernetes
|
public partial interface IKubernetes
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Watch changes to an object of kind ConfigMap
|
/// Watches for changes of an object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name">
|
|
||||||
/// name of the ConfigMap
|
|
||||||
/// </param>
|
|
||||||
/// <param name="namespace">
|
|
||||||
/// object name and auth scope, such as for teams and projects
|
|
||||||
/// </param>
|
|
||||||
/// <param name="continue">
|
/// <param name="continue">
|
||||||
/// The continue option should be set when retrieving more results from the server.
|
/// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
||||||
/// Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters
|
|
||||||
/// (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is
|
|
||||||
/// no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will
|
|
||||||
/// respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not
|
|
||||||
/// supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <param name="fieldSelector">
|
/// <param name="fieldSelector">
|
||||||
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
||||||
@@ -35,29 +23,19 @@ namespace k8s
|
|||||||
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <param name="limit">
|
/// <param name="limit">
|
||||||
/// limit is a maximum number of responses to return for a list call.
|
/// limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
|
||||||
/// If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.
|
///
|
||||||
/// Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the
|
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
|
||||||
/// presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results.
|
|
||||||
/// If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
|
|
||||||
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or
|
|
||||||
/// deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client
|
|
||||||
/// that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object
|
|
||||||
/// that was present at the time the first list result was calculated is returned
|
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <param name="pretty">
|
/// <param name="pretty">
|
||||||
/// If 'true', then the output is pretty printed.
|
/// If 'true', then the output is pretty printed.
|
||||||
/// </param>
|
/// </param>
|
||||||
|
/// <param name="resourceVersion">
|
||||||
|
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
|
||||||
|
/// </param>
|
||||||
/// <param name="timeoutSeconds">
|
/// <param name="timeoutSeconds">
|
||||||
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <param name="resourceVersion">
|
|
||||||
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.
|
|
||||||
/// When specified for list:
|
|
||||||
/// - if unset, then the result is returned from remote storage based on quorum-read flag;
|
|
||||||
/// - if it's 0, then we simply return what we currently have in cache, no guarantee;
|
|
||||||
/// - if set to non zero, then the result is at least as fresh as given rv.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="customHeaders">
|
/// <param name="customHeaders">
|
||||||
/// The headers that will be added to request.
|
/// The headers that will be added to request.
|
||||||
/// </param>
|
/// </param>
|
||||||
@@ -73,676 +51,6 @@ namespace k8s
|
|||||||
/// <returns>
|
/// <returns>
|
||||||
/// A <see cref="Task"/> which represents the asynchronous operation, and returns a new watcher.
|
/// A <see cref="Task"/> which represents the asynchronous operation, and returns a new watcher.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
Task<Watcher<V1ConfigMap>> WatchNamespacedConfigMapAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1ConfigMap> 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, CancellationToken cancellationToken = default(CancellationToken));
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Watch changes to an object of kind Endpoints
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="name">
|
|
||||||
/// name of the ConfigMap
|
|
||||||
/// </param>
|
|
||||||
/// <param name="namespace">
|
|
||||||
/// object name and auth scope, such as for teams and projects
|
|
||||||
/// </param>
|
|
||||||
/// <param name="continue">
|
|
||||||
/// The continue option should be set when retrieving more results from the server.
|
|
||||||
/// Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters
|
|
||||||
/// (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is
|
|
||||||
/// no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will
|
|
||||||
/// respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not
|
|
||||||
/// supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="fieldSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="includeUninitialized">
|
|
||||||
/// If true, partially initialized resources are included in the response.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="labelSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="limit">
|
|
||||||
/// limit is a maximum number of responses to return for a list call.
|
|
||||||
/// If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.
|
|
||||||
/// Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the
|
|
||||||
/// presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results.
|
|
||||||
/// If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
|
|
||||||
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or
|
|
||||||
/// deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client
|
|
||||||
/// that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object
|
|
||||||
/// that was present at the time the first list result was calculated is returned
|
|
||||||
/// </param>
|
|
||||||
/// <param name="pretty">
|
|
||||||
/// If 'true', then the output is pretty printed.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="timeoutSeconds">
|
|
||||||
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="resourceVersion">
|
|
||||||
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.
|
|
||||||
/// When specified for list:
|
|
||||||
/// - if unset, then the result is returned from remote storage based on quorum-read flag;
|
|
||||||
/// - if it's 0, then we simply return what we currently have in cache, no guarantee;
|
|
||||||
/// - if set to non zero, then the result is at least as fresh as given rv.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="customHeaders">
|
|
||||||
/// The headers that will be added to request.
|
|
||||||
/// </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="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<V1Endpoints>> WatchNamespacedEndpointAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1Endpoints> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken));
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Watch changes to an object of kind Event
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="name">
|
|
||||||
/// name of the ConfigMap
|
|
||||||
/// </param>
|
|
||||||
/// <param name="namespace">
|
|
||||||
/// object name and auth scope, such as for teams and projects
|
|
||||||
/// </param>
|
|
||||||
/// <param name="continue">
|
|
||||||
/// The continue option should be set when retrieving more results from the server.
|
|
||||||
/// Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters
|
|
||||||
/// (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is
|
|
||||||
/// no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will
|
|
||||||
/// respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not
|
|
||||||
/// supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="fieldSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="includeUninitialized">
|
|
||||||
/// If true, partially initialized resources are included in the response.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="labelSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="limit">
|
|
||||||
/// limit is a maximum number of responses to return for a list call.
|
|
||||||
/// If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.
|
|
||||||
/// Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the
|
|
||||||
/// presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results.
|
|
||||||
/// If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
|
|
||||||
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or
|
|
||||||
/// deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client
|
|
||||||
/// that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object
|
|
||||||
/// that was present at the time the first list result was calculated is returned
|
|
||||||
/// </param>
|
|
||||||
/// <param name="pretty">
|
|
||||||
/// If 'true', then the output is pretty printed.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="timeoutSeconds">
|
|
||||||
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="resourceVersion">
|
|
||||||
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.
|
|
||||||
/// When specified for list:
|
|
||||||
/// - if unset, then the result is returned from remote storage based on quorum-read flag;
|
|
||||||
/// - if it's 0, then we simply return what we currently have in cache, no guarantee;
|
|
||||||
/// - if set to non zero, then the result is at least as fresh as given rv.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="customHeaders">
|
|
||||||
/// The headers that will be added to request.
|
|
||||||
/// </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="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<V1Event>> WatchNamespacedEventAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1Event> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken));
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Watch changes to an object of kind LimitRange
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="name">
|
|
||||||
/// name of the ConfigMap
|
|
||||||
/// </param>
|
|
||||||
/// <param name="namespace">
|
|
||||||
/// object name and auth scope, such as for teams and projects
|
|
||||||
/// </param>
|
|
||||||
/// <param name="continue">
|
|
||||||
/// The continue option should be set when retrieving more results from the server.
|
|
||||||
/// Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters
|
|
||||||
/// (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is
|
|
||||||
/// no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will
|
|
||||||
/// respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not
|
|
||||||
/// supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="fieldSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="includeUninitialized">
|
|
||||||
/// If true, partially initialized resources are included in the response.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="labelSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="limit">
|
|
||||||
/// limit is a maximum number of responses to return for a list call.
|
|
||||||
/// If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.
|
|
||||||
/// Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the
|
|
||||||
/// presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results.
|
|
||||||
/// If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
|
|
||||||
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or
|
|
||||||
/// deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client
|
|
||||||
/// that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object
|
|
||||||
/// that was present at the time the first list result was calculated is returned
|
|
||||||
/// </param>
|
|
||||||
/// <param name="pretty">
|
|
||||||
/// If 'true', then the output is pretty printed.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="timeoutSeconds">
|
|
||||||
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="resourceVersion">
|
|
||||||
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.
|
|
||||||
/// When specified for list:
|
|
||||||
/// - if unset, then the result is returned from remote storage based on quorum-read flag;
|
|
||||||
/// - if it's 0, then we simply return what we currently have in cache, no guarantee;
|
|
||||||
/// - if set to non zero, then the result is at least as fresh as given rv.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="customHeaders">
|
|
||||||
/// The headers that will be added to request.
|
|
||||||
/// </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="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<V1LimitRange>> WatchNamespacedLimitRangeAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1LimitRange> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken));
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Watch changes to an object of kind Namespace
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="name">
|
|
||||||
/// name of the ConfigMap
|
|
||||||
/// </param>
|
|
||||||
/// <param name="namespace">
|
|
||||||
/// object name and auth scope, such as for teams and projects
|
|
||||||
/// </param>
|
|
||||||
/// <param name="continue">
|
|
||||||
/// The continue option should be set when retrieving more results from the server.
|
|
||||||
/// Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters
|
|
||||||
/// (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is
|
|
||||||
/// no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will
|
|
||||||
/// respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not
|
|
||||||
/// supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="fieldSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="includeUninitialized">
|
|
||||||
/// If true, partially initialized resources are included in the response.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="labelSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="limit">
|
|
||||||
/// limit is a maximum number of responses to return for a list call.
|
|
||||||
/// If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.
|
|
||||||
/// Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the
|
|
||||||
/// presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results.
|
|
||||||
/// If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
|
|
||||||
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or
|
|
||||||
/// deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client
|
|
||||||
/// that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object
|
|
||||||
/// that was present at the time the first list result was calculated is returned
|
|
||||||
/// </param>
|
|
||||||
/// <param name="pretty">
|
|
||||||
/// If 'true', then the output is pretty printed.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="timeoutSeconds">
|
|
||||||
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="resourceVersion">
|
|
||||||
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.
|
|
||||||
/// When specified for list:
|
|
||||||
/// - if unset, then the result is returned from remote storage based on quorum-read flag;
|
|
||||||
/// - if it's 0, then we simply return what we currently have in cache, no guarantee;
|
|
||||||
/// - if set to non zero, then the result is at least as fresh as given rv.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="customHeaders">
|
|
||||||
/// The headers that will be added to request.
|
|
||||||
/// </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="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<V1Namespace>> WatchNamespaceAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1Namespace> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken));
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Watch changes to an object of kind Node
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="name">
|
|
||||||
/// name of the ConfigMap
|
|
||||||
/// </param>
|
|
||||||
/// <param name="namespace">
|
|
||||||
/// object name and auth scope, such as for teams and projects
|
|
||||||
/// </param>
|
|
||||||
/// <param name="continue">
|
|
||||||
/// The continue option should be set when retrieving more results from the server.
|
|
||||||
/// Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters
|
|
||||||
/// (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is
|
|
||||||
/// no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will
|
|
||||||
/// respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not
|
|
||||||
/// supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="fieldSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="includeUninitialized">
|
|
||||||
/// If true, partially initialized resources are included in the response.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="labelSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="limit">
|
|
||||||
/// limit is a maximum number of responses to return for a list call.
|
|
||||||
/// If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.
|
|
||||||
/// Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the
|
|
||||||
/// presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results.
|
|
||||||
/// If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
|
|
||||||
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or
|
|
||||||
/// deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client
|
|
||||||
/// that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object
|
|
||||||
/// that was present at the time the first list result was calculated is returned
|
|
||||||
/// </param>
|
|
||||||
/// <param name="pretty">
|
|
||||||
/// If 'true', then the output is pretty printed.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="timeoutSeconds">
|
|
||||||
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="resourceVersion">
|
|
||||||
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.
|
|
||||||
/// When specified for list:
|
|
||||||
/// - if unset, then the result is returned from remote storage based on quorum-read flag;
|
|
||||||
/// - if it's 0, then we simply return what we currently have in cache, no guarantee;
|
|
||||||
/// - if set to non zero, then the result is at least as fresh as given rv.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="customHeaders">
|
|
||||||
/// The headers that will be added to request.
|
|
||||||
/// </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="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<V1Node>> WatchNodeAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1Node> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken));
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Watch changes to an object of kind PersistentVolumeClaim
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="name">
|
|
||||||
/// name of the ConfigMap
|
|
||||||
/// </param>
|
|
||||||
/// <param name="namespace">
|
|
||||||
/// object name and auth scope, such as for teams and projects
|
|
||||||
/// </param>
|
|
||||||
/// <param name="continue">
|
|
||||||
/// The continue option should be set when retrieving more results from the server.
|
|
||||||
/// Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters
|
|
||||||
/// (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is
|
|
||||||
/// no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will
|
|
||||||
/// respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not
|
|
||||||
/// supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="fieldSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="includeUninitialized">
|
|
||||||
/// If true, partially initialized resources are included in the response.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="labelSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="limit">
|
|
||||||
/// limit is a maximum number of responses to return for a list call.
|
|
||||||
/// If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.
|
|
||||||
/// Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the
|
|
||||||
/// presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results.
|
|
||||||
/// If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
|
|
||||||
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or
|
|
||||||
/// deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client
|
|
||||||
/// that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object
|
|
||||||
/// that was present at the time the first list result was calculated is returned
|
|
||||||
/// </param>
|
|
||||||
/// <param name="pretty">
|
|
||||||
/// If 'true', then the output is pretty printed.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="timeoutSeconds">
|
|
||||||
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="resourceVersion">
|
|
||||||
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.
|
|
||||||
/// When specified for list:
|
|
||||||
/// - if unset, then the result is returned from remote storage based on quorum-read flag;
|
|
||||||
/// - if it's 0, then we simply return what we currently have in cache, no guarantee;
|
|
||||||
/// - if set to non zero, then the result is at least as fresh as given rv.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="customHeaders">
|
|
||||||
/// The headers that will be added to request.
|
|
||||||
/// </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="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<V1PersistentVolumeClaim>> WatchNamespacedPersistentVolumeClaimAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1PersistentVolumeClaim> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken));
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Watch changes to an object of kind PersistentVolume
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="name">
|
|
||||||
/// name of the ConfigMap
|
|
||||||
/// </param>
|
|
||||||
/// <param name="namespace">
|
|
||||||
/// object name and auth scope, such as for teams and projects
|
|
||||||
/// </param>
|
|
||||||
/// <param name="continue">
|
|
||||||
/// The continue option should be set when retrieving more results from the server.
|
|
||||||
/// Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters
|
|
||||||
/// (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is
|
|
||||||
/// no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will
|
|
||||||
/// respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not
|
|
||||||
/// supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="fieldSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="includeUninitialized">
|
|
||||||
/// If true, partially initialized resources are included in the response.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="labelSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="limit">
|
|
||||||
/// limit is a maximum number of responses to return for a list call.
|
|
||||||
/// If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.
|
|
||||||
/// Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the
|
|
||||||
/// presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results.
|
|
||||||
/// If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
|
|
||||||
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or
|
|
||||||
/// deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client
|
|
||||||
/// that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object
|
|
||||||
/// that was present at the time the first list result was calculated is returned
|
|
||||||
/// </param>
|
|
||||||
/// <param name="pretty">
|
|
||||||
/// If 'true', then the output is pretty printed.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="timeoutSeconds">
|
|
||||||
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="resourceVersion">
|
|
||||||
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.
|
|
||||||
/// When specified for list:
|
|
||||||
/// - if unset, then the result is returned from remote storage based on quorum-read flag;
|
|
||||||
/// - if it's 0, then we simply return what we currently have in cache, no guarantee;
|
|
||||||
/// - if set to non zero, then the result is at least as fresh as given rv.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="customHeaders">
|
|
||||||
/// The headers that will be added to request.
|
|
||||||
/// </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="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<V1PersistentVolume>> WatchPersistentVolumeAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1PersistentVolume> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken));
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Watch changes to an object of kind Pod
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="name">
|
|
||||||
/// name of the ConfigMap
|
|
||||||
/// </param>
|
|
||||||
/// <param name="namespace">
|
|
||||||
/// object name and auth scope, such as for teams and projects
|
|
||||||
/// </param>
|
|
||||||
/// <param name="continue">
|
|
||||||
/// The continue option should be set when retrieving more results from the server.
|
|
||||||
/// Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters
|
|
||||||
/// (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is
|
|
||||||
/// no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will
|
|
||||||
/// respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not
|
|
||||||
/// supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="fieldSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="includeUninitialized">
|
|
||||||
/// If true, partially initialized resources are included in the response.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="labelSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="limit">
|
|
||||||
/// limit is a maximum number of responses to return for a list call.
|
|
||||||
/// If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.
|
|
||||||
/// Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the
|
|
||||||
/// presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results.
|
|
||||||
/// If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
|
|
||||||
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or
|
|
||||||
/// deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client
|
|
||||||
/// that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object
|
|
||||||
/// that was present at the time the first list result was calculated is returned
|
|
||||||
/// </param>
|
|
||||||
/// <param name="pretty">
|
|
||||||
/// If 'true', then the output is pretty printed.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="timeoutSeconds">
|
|
||||||
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="resourceVersion">
|
|
||||||
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.
|
|
||||||
/// When specified for list:
|
|
||||||
/// - if unset, then the result is returned from remote storage based on quorum-read flag;
|
|
||||||
/// - if it's 0, then we simply return what we currently have in cache, no guarantee;
|
|
||||||
/// - if set to non zero, then the result is at least as fresh as given rv.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="customHeaders">
|
|
||||||
/// The headers that will be added to request.
|
|
||||||
/// </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="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<V1Pod>> WatchNamespacedPodAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1Pod> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken));
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Watch changes to an object of kind PodTemplate
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="name">
|
|
||||||
/// name of the ConfigMap
|
|
||||||
/// </param>
|
|
||||||
/// <param name="namespace">
|
|
||||||
/// object name and auth scope, such as for teams and projects
|
|
||||||
/// </param>
|
|
||||||
/// <param name="continue">
|
|
||||||
/// The continue option should be set when retrieving more results from the server.
|
|
||||||
/// Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters
|
|
||||||
/// (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is
|
|
||||||
/// no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will
|
|
||||||
/// respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not
|
|
||||||
/// supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="fieldSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="includeUninitialized">
|
|
||||||
/// If true, partially initialized resources are included in the response.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="labelSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="limit">
|
|
||||||
/// limit is a maximum number of responses to return for a list call.
|
|
||||||
/// If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.
|
|
||||||
/// Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the
|
|
||||||
/// presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results.
|
|
||||||
/// If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
|
|
||||||
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or
|
|
||||||
/// deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client
|
|
||||||
/// that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object
|
|
||||||
/// that was present at the time the first list result was calculated is returned
|
|
||||||
/// </param>
|
|
||||||
/// <param name="pretty">
|
|
||||||
/// If 'true', then the output is pretty printed.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="timeoutSeconds">
|
|
||||||
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="resourceVersion">
|
|
||||||
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.
|
|
||||||
/// When specified for list:
|
|
||||||
/// - if unset, then the result is returned from remote storage based on quorum-read flag;
|
|
||||||
/// - if it's 0, then we simply return what we currently have in cache, no guarantee;
|
|
||||||
/// - if set to non zero, then the result is at least as fresh as given rv.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="customHeaders">
|
|
||||||
/// The headers that will be added to request.
|
|
||||||
/// </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="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<V1PodTemplate>> WatchNamespacedPodTemplateAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1PodTemplate> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken));
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Watch changes to an object of kind ReplicationController
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="name">
|
|
||||||
/// name of the ConfigMap
|
|
||||||
/// </param>
|
|
||||||
/// <param name="namespace">
|
|
||||||
/// object name and auth scope, such as for teams and projects
|
|
||||||
/// </param>
|
|
||||||
/// <param name="continue">
|
|
||||||
/// The continue option should be set when retrieving more results from the server.
|
|
||||||
/// Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters
|
|
||||||
/// (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is
|
|
||||||
/// no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will
|
|
||||||
/// respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not
|
|
||||||
/// supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="fieldSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="includeUninitialized">
|
|
||||||
/// If true, partially initialized resources are included in the response.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="labelSelector">
|
|
||||||
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="limit">
|
|
||||||
/// limit is a maximum number of responses to return for a list call.
|
|
||||||
/// If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.
|
|
||||||
/// Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the
|
|
||||||
/// presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results.
|
|
||||||
/// If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
|
|
||||||
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or
|
|
||||||
/// deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client
|
|
||||||
/// that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object
|
|
||||||
/// that was present at the time the first list result was calculated is returned
|
|
||||||
/// </param>
|
|
||||||
/// <param name="pretty">
|
|
||||||
/// If 'true', then the output is pretty printed.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="timeoutSeconds">
|
|
||||||
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="resourceVersion">
|
|
||||||
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.
|
|
||||||
/// When specified for list:
|
|
||||||
/// - if unset, then the result is returned from remote storage based on quorum-read flag;
|
|
||||||
/// - if it's 0, then we simply return what we currently have in cache, no guarantee;
|
|
||||||
/// - if set to non zero, then the result is at least as fresh as given rv.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="customHeaders">
|
|
||||||
/// The headers that will be added to request.
|
|
||||||
/// </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="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<V1ReplicationController>> WatchNamespacedReplicationControllerAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1ReplicationController> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using k8s.Models;
|
|
||||||
using Microsoft.AspNetCore.WebUtilities;
|
using Microsoft.AspNetCore.WebUtilities;
|
||||||
using Microsoft.Rest;
|
using Microsoft.Rest;
|
||||||
using System;
|
using System;
|
||||||
@@ -14,83 +13,7 @@ namespace k8s
|
|||||||
public partial class Kubernetes
|
public partial class Kubernetes
|
||||||
{
|
{
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public Task<Watcher<V1ConfigMap>> WatchNamespacedConfigMapAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1ConfigMap> 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, CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
|
||||||
return WatchNamespacedObjectAsync<V1ConfigMap>("configmaps", name, @namespace, @continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, timeoutSeconds, resourceVersion, customHeaders, onEvent, onError, cancellationToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public Task<Watcher<V1Endpoints>> WatchNamespacedEndpointAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1Endpoints> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken))
|
|
||||||
{
|
|
||||||
return WatchNamespacedObjectAsync<V1Endpoints>("endpoints", name, @namespace, @continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, timeoutSeconds, resourceVersion, customHeaders, onEvent, onError, cancellationToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public Task<Watcher<V1Event>> WatchNamespacedEventAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1Event> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken))
|
|
||||||
{
|
|
||||||
return WatchNamespacedObjectAsync<V1Event>("events", name, @namespace, @continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, timeoutSeconds, resourceVersion, customHeaders, onEvent, onError, cancellationToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public Task<Watcher<V1LimitRange>> WatchNamespacedLimitRangeAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1LimitRange> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken))
|
|
||||||
{
|
|
||||||
return WatchNamespacedObjectAsync<V1LimitRange>("limitranges", name, @namespace, @continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, timeoutSeconds, resourceVersion, customHeaders, onEvent, onError, cancellationToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public Task<Watcher<V1Namespace>> WatchNamespaceAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1Namespace> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken))
|
|
||||||
{
|
|
||||||
return WatchObjectAsync<V1Namespace>("namespaces", name, @namespace, @continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, timeoutSeconds, resourceVersion, customHeaders, onEvent, onError, cancellationToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public Task<Watcher<V1Node>> WatchNodeAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1Node> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken))
|
|
||||||
{
|
|
||||||
return WatchObjectAsync<V1Node>("nodes", name, @namespace, @continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, timeoutSeconds, resourceVersion, customHeaders, onEvent, onError, cancellationToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public Task<Watcher<V1PersistentVolumeClaim>> WatchNamespacedPersistentVolumeClaimAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1PersistentVolumeClaim> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken))
|
|
||||||
{
|
|
||||||
return WatchNamespacedObjectAsync<V1PersistentVolumeClaim>("persistentvolumeclaims", name, @namespace, @continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, timeoutSeconds, resourceVersion, customHeaders, onEvent, onError, cancellationToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public Task<Watcher<V1PersistentVolume>> WatchPersistentVolumeAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1PersistentVolume> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken))
|
|
||||||
{
|
|
||||||
return WatchObjectAsync<V1PersistentVolume>("persistentvolumes", name, @namespace, @continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, timeoutSeconds, resourceVersion, customHeaders, onEvent, onError, cancellationToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public Task<Watcher<V1Pod>> WatchNamespacedPodAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1Pod> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken))
|
|
||||||
{
|
|
||||||
return WatchNamespacedObjectAsync<V1Pod>("pods", name, @namespace, @continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, timeoutSeconds, resourceVersion, customHeaders, onEvent, onError, cancellationToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public Task<Watcher<V1PodTemplate>> WatchNamespacedPodTemplateAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1PodTemplate> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken))
|
|
||||||
{
|
|
||||||
return WatchNamespacedObjectAsync<V1PodTemplate>("podtemplates", name, @namespace, @continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, timeoutSeconds, resourceVersion, customHeaders, onEvent, onError, cancellationToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public Task<Watcher<V1ReplicationController>> WatchNamespacedReplicationControllerAsync(string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, V1ReplicationController> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken))
|
|
||||||
{
|
|
||||||
return WatchNamespacedObjectAsync<V1ReplicationController>("replicationcontrollers", name, @namespace, @continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, timeoutSeconds, resourceVersion, customHeaders, onEvent, onError, cancellationToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task<Watcher<T>> WatchNamespacedObjectAsync<T>(string resourceType, string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, T> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken))
|
|
||||||
{
|
|
||||||
|
|
||||||
if (@namespace == null)
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException(nameof(@namespace));
|
|
||||||
}
|
|
||||||
|
|
||||||
return WatchObjectAsync<T>(resourceType, name, @namespace, @continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, timeoutSeconds, resourceVersion, customHeaders, onEvent, onError, cancellationToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<Watcher<T>> WatchObjectAsync<T>(string resourceType, string name, string @namespace, string @continue = null, string fieldSelector = null, bool? includeUninitialized = null, string labelSelector = null, int? limit = null, bool? pretty = null, int? timeoutSeconds = null, int? resourceVersion = null, Dictionary<string, List<string>> customHeaders = null, Action<WatchEventType, T> onEvent = null, Action<Exception> onError = null, CancellationToken cancellationToken = default(CancellationToken))
|
|
||||||
{
|
{
|
||||||
// Tracing
|
// Tracing
|
||||||
bool _shouldTrace = ServiceClientTracing.IsEnabled;
|
bool _shouldTrace = ServiceClientTracing.IsEnabled;
|
||||||
@@ -99,8 +22,7 @@ namespace k8s
|
|||||||
{
|
{
|
||||||
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
|
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
|
||||||
Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
|
Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
|
||||||
tracingParameters.Add("name", name);
|
tracingParameters.Add("path", path);
|
||||||
tracingParameters.Add("namespace", @namespace);
|
|
||||||
tracingParameters.Add("continue", @continue);
|
tracingParameters.Add("continue", @continue);
|
||||||
tracingParameters.Add("fieldSelector", fieldSelector);
|
tracingParameters.Add("fieldSelector", fieldSelector);
|
||||||
tracingParameters.Add("includeUninitialized", includeUninitialized);
|
tracingParameters.Add("includeUninitialized", includeUninitialized);
|
||||||
@@ -109,7 +31,7 @@ namespace k8s
|
|||||||
tracingParameters.Add("pretty", pretty);
|
tracingParameters.Add("pretty", pretty);
|
||||||
tracingParameters.Add("timeoutSeconds", timeoutSeconds);
|
tracingParameters.Add("timeoutSeconds", timeoutSeconds);
|
||||||
tracingParameters.Add("resourceVersion", resourceVersion);
|
tracingParameters.Add("resourceVersion", resourceVersion);
|
||||||
ServiceClientTracing.Enter(_invocationId, this, nameof(WatchNamespacedPodAsync), tracingParameters);
|
ServiceClientTracing.Enter(_invocationId, this, nameof(WatchObjectAsync), tracingParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construct URL
|
// Construct URL
|
||||||
@@ -119,14 +41,7 @@ namespace k8s
|
|||||||
uriBuilder.Path += "/";
|
uriBuilder.Path += "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
uriBuilder.Path += "api/v1/watch";
|
uriBuilder.Path += path;
|
||||||
|
|
||||||
if (@namespace != null)
|
|
||||||
{
|
|
||||||
uriBuilder.Path += $"/namespaces/{@namespace}";
|
|
||||||
}
|
|
||||||
|
|
||||||
uriBuilder.Path += $"/{resourceType}/{name}";
|
|
||||||
|
|
||||||
var query = string.Empty;
|
var query = string.Empty;
|
||||||
|
|
||||||
@@ -171,7 +86,7 @@ namespace k8s
|
|||||||
|
|
||||||
if (resourceVersion != null)
|
if (resourceVersion != null)
|
||||||
{
|
{
|
||||||
query = QueryHelpers.AddQueryString(query, "resourceVersion", resourceVersion.Value.ToString());
|
query = QueryHelpers.AddQueryString(query, "resourceVersion", resourceVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
uriBuilder.Query = query;
|
uriBuilder.Query = query;
|
||||||
|
|||||||
4268
src/KubernetesClient/generated/IKubernetes.Watch.cs
Normal file
4268
src/KubernetesClient/generated/IKubernetes.Watch.cs
Normal file
File diff suppressed because it is too large
Load Diff
1355
src/KubernetesClient/generated/Kubernetes.Watch.cs
Normal file
1355
src/KubernetesClient/generated/Kubernetes.Watch.cs
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user