Commit ca49f148 authored by Alberto Miranda's avatar Alberto Miranda ♨️
Browse files

Add staging_directory option to configuration file

parent d86a27e8
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -25,7 +25,10 @@ global_settings: [
  remote_port: 42000,
  
  # number of worker threads to serve I/O requests
  workers: 4
  workers: 4,

  # staging dir for temporary resources
  staging_directory: "/tmp/urd/"
]

## list of namespaces available by default when service starts
+1 −0
Original line number Diff line number Diff line
@@ -261,6 +261,7 @@ config/defaults.cpp: Makefile
	   echo "    const char* pidfile              = \"$(localstatedir)/urd.pid\";"; \
\
	   echo "    const uint32_t workers_in_pool   = std::thread::hardware_concurrency();"; \
	   echo "    const char* staging_directory    = \"/tmp/urd/\";"; \
	   echo "    const uint32_t backlog_size      = 128;"; \
	   echo "    const char* config_file          = \"$(sysconfdir)/norns.conf\";"; \
	   echo "} // namespace defaults"; \
+5 −0
Original line number Diff line number Diff line
@@ -102,6 +102,11 @@ const file_schema valid_options = declare_file({
                    keywords::workers, 
                    opt_type::mandatory, 
                    converter<uint32_t>(parsers::parse_number)), 

            declare_option<bfs::path>(
                    keywords::staging_directory, 
                    opt_type::mandatory, 
                    converter<bfs::path>(parsers::parse_path)), 
        })
    ),

+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ namespace defaults {
    extern const in_port_t  remote_port;
    extern const char*      pidfile;
    extern const uint32_t   workers_in_pool;
    extern const char*      staging_directory;
    extern const uint32_t   backlog_size;
    extern const char*      config_file;

+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ constexpr static const auto bind_address = "bind_address";
constexpr static const auto remote_port = "remote_port";
constexpr static const auto pidfile = "pidfile";
constexpr static const auto workers = "workers";
constexpr static const auto staging_directory = "staging_directory";

// option names for 'namespaces' section
constexpr static const auto nsid = "nsid";
Loading