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