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