1 type derived from CustomResource
Aspire.Hosting (1)
Dcp\Model\ModelCommon.cs (1)
120internal abstract class CustomResource<TSpec, TStatus> : CustomResource
56 references to CustomResource
Aspire.Hosting (56)
Dcp\AppResource.cs (2)
14public CustomResource DcpResource { get; } 21public AppResource(IResource modelResource, CustomResource dcpResource)
Dcp\DcpExecutor.cs (29)
279async Task WatchKubernetesResourceAsync<T>(Func<WatchEventType, T, Task> handler) where T : CustomResource 317private async Task ProcessResourceChange<T>(WatchEventType watchEventType, T resource, ConcurrentDictionary<string, T> resourceByName, string resourceKind, Func<T, CustomResourceSnapshot, CustomResourceSnapshot> snapshotFactory) where T : CustomResource 386else if (resource.Metadata.Annotations?.TryGetValue(CustomResource.ServiceProducerAnnotation, out var servicesProducedAnnotationJson) == true) 398private static string GetResourceType<T>(T resource, IResource appModelResource) where T : CustomResource 408private static ResourceStatus GetResourceStatus(CustomResource resource) 421private void StartLogStream<T>(T resource) where T : CustomResource 520CustomResource? cr = resourceKind switch 552where T : CustomResource 737svc.Annotate(CustomResource.ResourceNameAnnotation, sp.ModelResource.Name); 738svc.Annotate(CustomResource.EndpointNameAnnotation, endpoint.Name); 766exe.Annotate(CustomResource.OtelServiceNameAnnotation, executable.Name); 767exe.Annotate(CustomResource.OtelServiceInstanceIdAnnotation, exeInstance.Suffix); 768exe.Annotate(CustomResource.ResourceNameAnnotation, executable.Name); 798exeSpec.Annotate(CustomResource.OtelServiceNameAnnotation, project.Name); 799exeSpec.Annotate(CustomResource.OtelServiceInstanceIdAnnotation, exeInstance.Suffix); 800exeSpec.Annotate(CustomResource.ResourceNameAnnotation, project.Name); 801exeSpec.Annotate(CustomResource.ResourceReplicaCount, replicas.ToString(CultureInfo.InvariantCulture)); 802exeSpec.Annotate(CustomResource.ResourceReplicaIndex, i.ToString(CultureInfo.InvariantCulture)); 891annotationHolder.Annotate(CustomResource.ResourceStateAnnotation, state); 969Func<Task<CustomResource>> createResource; 1057ctr.Annotate(CustomResource.ResourceNameAnnotation, container.Name); 1058ctr.Annotate(CustomResource.OtelServiceNameAnnotation, container.Name); 1059ctr.Annotate(CustomResource.OtelServiceInstanceIdAnnotation, containerObjectInstance.Suffix); 1426dcpResource.AnnotateAsObjectList(CustomResource.ServiceProducerAnnotation, spAnn); 1430static bool HasMultipleReplicas(CustomResource resource) 1432if (resource is Executable exe && exe.Metadata.Annotations.TryGetValue(CustomResource.ResourceReplicaCount, out var value) && int.TryParse(value, CultureInfo.InvariantCulture, out var replicas) && replicas > 1) 1440private async Task CreateResourcesAsync<RT>(CancellationToken cancellationToken) where RT : CustomResource 1468private static V1Patch CreatePatch<T>(T obj, Action<T> change) where T : CustomResource 1556async Task StartExecutableOrContainerAsync<T>(T resource) where T : CustomResource
Dcp\KubernetesService.cs (15)
36where T: CustomResource; 38where T : CustomResource; 40where T : CustomResource; 42where T : CustomResource; 44where T : CustomResource; 48where T : CustomResource; 54CancellationToken cancellationToken = default) where T : CustomResource; 71where T : CustomResource 102where T : CustomResource 135where T : CustomResource 170where T : CustomResource 200where T : CustomResource 234where T : CustomResource 280CancellationToken cancellationToken = default) where T : CustomResource 345private 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)
18where TResource : CustomResource
Dcp\ResourceSnapshotBuilder.cs (2)
150private ImmutableArray<UrlSnapshot> GetUrls(CustomResource resource) 225private static ImmutableArray<VolumeSnapshot> GetVolumes(CustomResource resource)
OtlpConfigurationExtensions.cs (2)
68context.EnvironmentVariables["OTEL_RESOURCE_ATTRIBUTES"] = "service.instance.id={{- index .Annotations \"" + CustomResource.OtelServiceInstanceIdAnnotation + "\" -}}"; 69context.EnvironmentVariables["OTEL_SERVICE_NAME"] = "{{- index .Annotations \"" + CustomResource.OtelServiceNameAnnotation + "\" -}}";