1 instantiation of ContainerExec
Aspire.Hosting (1)
Dcp\Model\ContainerExec.cs (1)
125var containerExec = new ContainerExec(new ContainerExecSpec
30 references to ContainerExec
Aspire.Hosting (30)
Dcp\ContainerCreator.cs (12)
46internal sealed class ContainerCreator : IObjectCreator<Container, ContainerCreationContext>, IObjectCreator<ContainerExec, EmptyCreationContext>, IDisposable 281var containerExec = ContainerExec.Create( 293var exeAppResource = new RenderedModelResource<ContainerExec>(containerExecutable, containerExec); 395var containerExes = _appResources.Get().OfType<RenderedModelResource<ContainerExec>>().Where(ar => ar.DcpResource.Spec.ContainerName == dcpContainer.Metadata.Name).ToArray(); 398IObjectCreator<ContainerExec, EmptyCreationContext> containerExecCreator = this; 403bool IObjectCreator<ContainerExec, EmptyCreationContext>.IsReadyToCreate(RenderedModelResource<ContainerExec> resource, EmptyCreationContext context) 406async Task IObjectCreator<ContainerExec, EmptyCreationContext>.CreateObjectAsync(RenderedModelResource<ContainerExec> er, EmptyCreationContext context, ILogger _, IDcpObjectFactory factory, CancellationToken cancellationToken) 408if (er.DcpResource is not ContainerExec containerExe) 410throw new InvalidOperationException($"Expected an {nameof(ContainerExec)} resource, but got {er.DcpResourceKind} instead");
Dcp\DcpExecutor.cs (2)
380ContainerExec => KnownResourceTypes.ContainerExec, 1033ContainerExec containerExec => s => _resourceWatcher.SnapshotBuilder.ToSnapshot(containerExec, s),
Dcp\DcpResourceState.cs (1)
14public readonly ConcurrentDictionary<string, ContainerExec> ContainerExecsMap = [];
Dcp\DcpResourceWatcher.cs (9)
128Task.Run(() => WatchKubernetesResourceAsync<ContainerExec>((t, r) => ProcessResourceChange(t, r, _resourceState.ContainerExecsMap, Model.Dcp.ContainerExecKind, (c, s) => _snapshotBuilder.ToSnapshot(c, s)))), 181else if (_resourceState.ContainerExecsMap.TryGetValue(entry.ResourceName, out var containerExec)) 496resource is ContainerExec { LogsAvailable: true }; 521if (resource is ContainerExec containerExec) 557else if (_resourceState.ContainerExecsMap.TryGetValue(resourceName, out var containerExec)) 559enumerable = new ResourceLogSource<ContainerExec>(_logger, _kubernetesService, containerExec, follow: false); 600ContainerExec e when e.LogsAvailable => new ResourceLogSource<T>(_logger, _kubernetesService, resource, follow: true), 895"ContainerExec" => _resourceState.ContainerExecsMap.TryGetValue(resourceName, out var containerExec) ? containerExec : null, 918else if (cr is ContainerExec containerExec)
Dcp\Model\ContainerExec.cs (4)
108/// Create a new <see cref="ContainerExec"/> resource. 115/// Create a new <see cref="ContainerExec"/> resource. 123public static ContainerExec Create(string name, string containerName, string command, List<string>? args = null, string? workingDirectory = null) 125var containerExec = new ContainerExec(new ContainerExecSpec
Dcp\Model\GroupVersion.cs (1)
43Schema.Add<ContainerExec>(ContainerExecKind, "containerexecs");
Dcp\ResourceSnapshotBuilder.cs (1)
98public CustomResourceSnapshot ToSnapshot(ContainerExec executable, CustomResourceSnapshot previous)