RStudio Launcher Plugin SDK
1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
|
Options for the plugin. More...
#include <Options.hpp>
Classes | |
class | Init |
Class for initializing Options. More... | |
Public Member Functions | |
Init | registerOptions () |
Allows the caller to register their options using the Init helper object. More... | |
Error | readOptions (int in_argc, const char *const in_argv[], const system::FilePath &in_location) |
Reads the option file, loading all registered options. More... | |
system::TimeDuration | getJobExpiryHours () const |
Gets the number of hours after which finished jobs expire and should be pruned from the plugin. More... | |
system::TimeDuration | getHeartbeatIntervalSeconds () const |
Gets the number of seconds between heartbeats. More... | |
logging::LogLevel | getLogLevel () const |
Gets the maximum level of log messages to write. More... | |
const system::FilePath & | getLauncherConfigFile () const |
Gets the location of the configuration file for the RStudio Job Launcher. More... | |
size_t | getMaxMessageSize () const |
Gets the maximum allowable size of messages which can be used in communications with the RStudio Launcher. More... | |
const std::string & | getPluginName () const |
Gets the name the administrator gave to this instance of the Plugin in the launcher.conf file. More... | |
const system::FilePath & | getRSandboxPath () const |
Gets the path to the rsandbox executable provided by the RStudio Workbench installation. More... | |
const system::FilePath & | getScratchPath () const |
Gets the scratch path to which log files and other plugin data may be written. More... | |
const system::FilePath & | getLoggingDir () const |
Gets path where debug logs should be written. More... | |
Error | getServerUser (system::User &out_serverUser) const |
Gets the user to run as when root privileges are dropped. More... | |
size_t | getThreadPoolSize () const |
Gets the size of the thread pool. More... | |
bool | useUnprivilegedMode () const |
Gets whether the plugin should run in single-user unprivileged mode. More... | |
bool | enableDebugLogging () const |
Gets whether debug logging is activated. More... | |
Static Public Member Functions | |
static Options & | getInstance () |
Gets the single instance of Options for the plugin. More... | |
Options for the plugin.
bool rstudio::launcher_plugins::options::Options::enableDebugLogging | ( | ) | const |
Gets whether debug logging is activated.
system::TimeDuration rstudio::launcher_plugins::options::Options::getHeartbeatIntervalSeconds | ( | ) | const |
Gets the number of seconds between heartbeats.
|
static |
system::TimeDuration rstudio::launcher_plugins::options::Options::getJobExpiryHours | ( | ) | const |
Gets the number of hours after which finished jobs expire and should be pruned from the plugin.
const system::FilePath& rstudio::launcher_plugins::options::Options::getLauncherConfigFile | ( | ) | const |
Gets the location of the configuration file for the RStudio Job Launcher.
This is useful if the plugin implementation requires knowledge of the Job Launcher's configuration. Most plugin implementations will not need this value.
const system::FilePath& rstudio::launcher_plugins::options::Options::getLoggingDir | ( | ) | const |
Gets path where debug logs should be written.
logging::LogLevel rstudio::launcher_plugins::options::Options::getLogLevel | ( | ) | const |
Gets the maximum level of log messages to write.
size_t rstudio::launcher_plugins::options::Options::getMaxMessageSize | ( | ) | const |
Gets the maximum allowable size of messages which can be used in communications with the RStudio Launcher.
It is not recommended to change this value directly in the Plugin's configuration file. Changes to this value will be propagated from the RStudio Launcher to all Plugins.
const std::string& rstudio::launcher_plugins::options::Options::getPluginName | ( | ) | const |
Gets the name the administrator gave to this instance of the Plugin in the launcher.conf file.
This value may be useful if a plugin implementation needs to be aware of other instances of the same Plugin in a load balanced scenario.
const system::FilePath& rstudio::launcher_plugins::options::Options::getRSandboxPath | ( | ) | const |
Gets the path to the rsandbox executable provided by the RStudio Workbench installation.
If RStudio Workbench is installed to the default location, this value does not need to be set.
const system::FilePath& rstudio::launcher_plugins::options::Options::getScratchPath | ( | ) | const |
Gets the scratch path to which log files and other plugin data may be written.
Note that this does not include job output. Job output should be written in the location specified by the user when the job is run.
Error rstudio::launcher_plugins::options::Options::getServerUser | ( | system::User & | out_serverUser | ) | const |
Gets the user to run as when root privileges are dropped.
out_serverUser | The server user, if it exists. |
size_t rstudio::launcher_plugins::options::Options::getThreadPoolSize | ( | ) | const |
Gets the size of the thread pool.
Error rstudio::launcher_plugins::options::Options::readOptions | ( | int | in_argc, |
const char *const | in_argv[], | ||
const system::FilePath & | in_location | ||
) |
Reads the option file, loading all registered options.
registerOptions() must be called before this is called in order to include additional options.
in_argc | The count of command line arguments. |
in_argv | The command line arguments. |
in_location | The location of the configuration file. Must exist. |
Init rstudio::launcher_plugins::options::Options::registerOptions | ( | ) |
bool rstudio::launcher_plugins::options::Options::useUnprivilegedMode | ( | ) | const |
Gets whether the plugin should run in single-user unprivileged mode.