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