1 type derived from CustomResource
Aspire.Hosting (1)
Dcp\Model\ModelCommon.cs (1)
120
internal abstract class CustomResource<TSpec, TStatus> :
CustomResource
55 references to CustomResource
Aspire.Hosting (55)
Dcp\ApplicationExecutor.cs (32)
38
public
CustomResource
DcpResource { get; }
42
public AppResource(IResource modelResource,
CustomResource
dcpResource)
328
async Task WatchKubernetesResourceAsync<T>(Func<WatchEventType, T, Task> handler) where T :
CustomResource
387
private async Task ProcessResourceChange<T>(WatchEventType watchEventType, T resource, ConcurrentDictionary<string, T> resourceByName, string resourceKind, Func<T, CustomResourceSnapshot, CustomResourceSnapshot> snapshotFactory) where T :
CustomResource
466
else if (resource.Metadata.Annotations?.TryGetValue(
CustomResource
.ServiceProducerAnnotation, out var servicesProducedAnnotationJson) == true)
478
private void StartLogStream<T>(T resource) where T :
CustomResource
577
CustomResource
? cr = resourceKind switch
737
private ImmutableArray<UrlSnapshot> GetUrls(
CustomResource
resource)
812
private static ImmutableArray<VolumeSnapshot> GetVolumes(
CustomResource
resource)
847
where T :
CustomResource
1054
svc.Annotate(
CustomResource
.ResourceNameAnnotation, sp.ModelResource.Name);
1055
svc.Annotate(
CustomResource
.EndpointNameAnnotation, endpoint.Name);
1083
exe.Annotate(
CustomResource
.OtelServiceNameAnnotation, executable.Name);
1084
exe.Annotate(
CustomResource
.OtelServiceInstanceIdAnnotation, exeInstance.Suffix);
1085
exe.Annotate(
CustomResource
.ResourceNameAnnotation, executable.Name);
1115
exeSpec.Annotate(
CustomResource
.OtelServiceNameAnnotation, project.Name);
1116
exeSpec.Annotate(
CustomResource
.OtelServiceInstanceIdAnnotation, exeInstance.Suffix);
1117
exeSpec.Annotate(
CustomResource
.ResourceNameAnnotation, project.Name);
1118
exeSpec.Annotate(
CustomResource
.ResourceReplicaCount, replicas.ToString(CultureInfo.InvariantCulture));
1119
exeSpec.Annotate(
CustomResource
.ResourceReplicaIndex, i.ToString(CultureInfo.InvariantCulture));
1208
annotationHolder.Annotate(
CustomResource
.ResourceStateAnnotation, state);
1309
Func<Task<
CustomResource
>> createResource;
1476
ctr.Annotate(
CustomResource
.ResourceNameAnnotation, container.Name);
1477
ctr.Annotate(
CustomResource
.OtelServiceNameAnnotation, container.Name);
1478
ctr.Annotate(
CustomResource
.OtelServiceInstanceIdAnnotation, containerObjectInstance.Suffix);
1900
dcpResource.AnnotateAsObjectList(
CustomResource
.ServiceProducerAnnotation, spAnn);
1904
static bool HasMultipleReplicas(
CustomResource
resource)
1910
if (resource is Executable exe && exe.Metadata.Annotations.TryGetValue(
CustomResource
.ResourceReplicaCount, out var value) && int.TryParse(value, CultureInfo.InvariantCulture, out var replicas) && replicas > 1)
1918
private async Task CreateResourcesAsync<RT>(CancellationToken cancellationToken) where RT :
CustomResource
2009
private async Task DeleteResourcesAsync<TResource>(string resourceType, CancellationToken cancellationToken) where TResource :
CustomResource
2034
internal static V1Patch CreatePatch<T>(T obj, Action<T> change) where T :
CustomResource
2108
async Task StartExecutableOrContainerAsync<T>(T resource) where T :
CustomResource
Dcp\KubernetesService.cs (15)
34
where T:
CustomResource
;
36
where T :
CustomResource
;
38
where T :
CustomResource
;
40
where T :
CustomResource
;
42
where T :
CustomResource
;
46
where T :
CustomResource
;
52
CancellationToken cancellationToken = default) where T :
CustomResource
;
68
where T :
CustomResource
99
where T :
CustomResource
132
where T :
CustomResource
167
where T :
CustomResource
197
where T :
CustomResource
231
where T :
CustomResource
271
CancellationToken cancellationToken = default) where T :
CustomResource
312
private static string GetResourceFor<T>() where T :
CustomResource
Dcp\Model\ExecutableReplicaSet.cs (2)
41
CustomResource
.AnnotateAsObjectList(Annotations, annotationName, value);
46
return
CustomResource
.TryGetAnnotationAsObjectList(Annotations, annotationName, out list);
Dcp\Model\ModelCommon.cs (1)
135
where T :
CustomResource
Dcp\Model\Schema.cs (2)
10
public void Add<T>(string kind, string resource) where T :
CustomResource
15
public bool TryGet<T>(out (string Kind, string Resource) kindWithResource) where T :
CustomResource
Dcp\ResourceLogSource.cs (1)
19
where TResource :
CustomResource
OtlpConfigurationExtensions.cs (2)
70
context.EnvironmentVariables["OTEL_RESOURCE_ATTRIBUTES"] = "service.instance.id={{- index .Annotations \"" +
CustomResource
.OtelServiceInstanceIdAnnotation + "\" -}}";
77
context.EnvironmentVariables["OTEL_SERVICE_NAME"] = "{{- index .Annotations \"" +
CustomResource
.OtelServiceNameAnnotation + "\" -}}";