FlatImage
A configurable Linux containerization system
Loading...
Searching...
No Matches
ns_db::ns_portal::ns_dispatcher::Dispatcher Class Reference

Public Member Functions

 Dispatcher (pid_t pid, Mode mode, fs::path const &path_dir_app, Logs const &logs)
 Construct a new Dispatcher:: Dispatcher object with paths.
 
fs::path get_path_dir_fifo () const
 
fs::path get_path_fifo_daemon () const
 
fs::path get_path_file_log () const
 

Friends

Value< Dispatcherdeserialize (std::string_view str_raw_json)
 Deserializes JSON string into a Binds object.
 
Value< std::string > serialize (Dispatcher const &dispatcher)
 Serializes a Dispatcher class into a json string.
 

Detailed Description

Definition at line 46 of file dispatcher.hpp.

Constructor & Destructor Documentation

◆ Dispatcher()

ns_db::ns_portal::ns_dispatcher::Dispatcher::Dispatcher ( pid_t pid,
Mode mode,
fs::path const & path_dir_app,
Logs const & logs )
inlineexplicit

Construct a new Dispatcher:: Dispatcher object with paths.

Parameters
path_dir_fifoThe FIFO directory path
path_fifo_daemonThe path to the daemon FIFO
path_file_logThe log file path

Definition at line 84 of file dispatcher.hpp.

Member Function Documentation

◆ get_path_dir_fifo()

fs::path ns_db::ns_portal::ns_dispatcher::Dispatcher::get_path_dir_fifo ( ) const
inline

Definition at line 59 of file dispatcher.hpp.

◆ get_path_fifo_daemon()

fs::path ns_db::ns_portal::ns_dispatcher::Dispatcher::get_path_fifo_daemon ( ) const
inline

Definition at line 60 of file dispatcher.hpp.

◆ get_path_file_log()

fs::path ns_db::ns_portal::ns_dispatcher::Dispatcher::get_path_file_log ( ) const
inline

Definition at line 61 of file dispatcher.hpp.

Friends And Related Symbol Documentation

◆ deserialize

Value< Dispatcher > deserialize ( std::string_view str_raw_json)
friend

Deserializes JSON string into a Binds object.

Parses a JSON string containing bind mount configurations and constructs a Binds object. Each JSON entry should have "src", "dst", and "type" fields. The type field must be "ro" (read-only), "rw" (read-write), or "dev" (device). Entries with invalid indices are logged as warnings and skipped. Successfully parsed entries are added to the Binds collection with their respective indices, source paths, destination paths, and access types.

Parameters
raw_jsonThe JSON string containing bind mount configurations
Returns
Value<Binds> The deserialized Binds object on success, or error on parse failure

Deserializes JSON string into a Binds object.

Parameters
str_raw_jsonThe json string which to deserialize
Returns
The Boot class or the respective error

Deserializes JSON string into a Binds object.

Parameters
raw_jsonThe json string which to deserialize
Returns
The Desktop class or the respective error

Deserializes JSON string into a Binds object.

Parameters
str_raw_jsonThe json string which to deserialize
Returns
The Logs class or the respective error

Deserializes JSON string into a Binds object.

Parameters
str_raw_jsonThe json string which to deserialize
Returns
The Daemon class or the respective error

Deserializes JSON string into a Binds object.

Parameters
str_raw_jsonThe json string which to deserialize
Returns
The Dispatcher class or the respective error

Deserializes JSON string into a Binds object.

Parameters
str_raw_jsonThe json string which to deserialize
Returns
The Message class or the respective error

Deserializes JSON string into a Binds object.

Parameters
raw_jsonThe json string which to deserialize
Returns
The Recipe class or the respective error

Definition at line 184 of file bind.hpp.

◆ serialize

Value< std::string > serialize ( Dispatcher const & dispatcher)
friend

Serializes a Dispatcher class into a json string.

Parameters
dispatcherThe Dispatcher object to serialize
Returns
The serialized json data

Definition at line 121 of file dispatcher.hpp.


The documentation for this class was generated from the following file: