32namespace fs = std::filesystem;
50 std::unique_ptr<ns_subprocess::Child> m_child;
55 friend constexpr std::unique_ptr<Portal> std::make_unique<Portal>();
62inline Portal::Portal()
76 auto portal = std::make_unique<Portal>();
78 fs::path path_bin_daemon = daemon.get_path_bin_daemon();
79 return_if(portal ==
nullptr, Error(
"E::Could not create portal object"));
80 return_if(not Try(fs::exists(path_bin_daemon)), Error(
"E::Daemon not found in {}", path_bin_daemon));
friend Value< std::unique_ptr< Portal > > spawn(Daemon const &daemon, Logs const &logs)
Spawns a new portal daemon instance.
Subprocess & with_var(K &&k, V &&v)
Adds or replaces a single environment variable.
std::unique_ptr< Child > spawn()
Spawns (forks) the child process and begins execution.
Subprocess & with_daemon()
Enable daemon mode using double fork pattern.
Defines a class that manages FlatImage's portal configuration.
Enhanced error handling framework built on std::expected.
A library for manipulating environment variables.
Value< std::string > serialize(Logs const &logs) noexcept
Serializes a Logs class into a json string.
Portal daemon configuration and management.
Value< std::string > serialize(Daemon const &daemon) noexcept
Serializes a Daemon class into a json string.
Portal IPC system for host-container communication.
Value< std::unique_ptr< Portal > > spawn(Daemon const &daemon, Logs const &logs)
Spawns a new portal daemon instance.
Enhanced expected type with integrated logging capabilities.
A library to spawn sub-processes in linux.