Container
Methods
Start()Stop(Signal signal, TimeSpan timeout)Delete(DeleteContainerOption options)CreateProcess(ProcessSettings newProcessSettings)Inspect()Id()InitProcess()State()Close()
Behavior notes
Start()automatically setsWSLC_CONTAINER_START_FLAG_ATTACHif an init process exists and its output mode isEventorStream.Stop()converts the timeout to seconds, rejects negative values, and rejects values that exceeduint32_t.InitProcess()throws if the container was not configured with one.
Examples
container.Start();
container.Stop(static_cast<Signal>(15), std::chrono::seconds(10));
container.Delete(DeleteContainerOption::None);
auto proc = container.CreateProcess(procSettings);
auto inspectJson = container.Inspect();
auto id = container.Id();
auto state = container.State();
auto init = container.InitProcess();