RStudio Launcher Plugin SDK
1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
|
21 #ifndef LAUNCHER_PLUGINS_ABSTRACT_OPTIONS_HPP
22 #define LAUNCHER_PLUGINS_ABSTRACT_OPTIONS_HPP
24 #include <boost/noncopyable.hpp>
26 #include <boost/program_options/value_semantic.hpp>
32 #include "system/DateTime.hpp"
35 namespace launcher_plugins {
46 namespace launcher_plugins {
95 explicit Value(T& io_storeTo);
110 PRIVATE_IMPL_SHARED(m_impl);
312 PRIVATE_IMPL(m_impl);
logging::LogLevel getLogLevel() const
Gets the maximum level of log messages to write.
static Options & getInstance()
Gets the single instance of Options for the plugin.
Class which represents a path on the system. May be any type of file (e.g. directory,...
Definition: FilePath.hpp:77
Value & setDefaultValue(const T &in_defaultValue)
Sets the default value of the option.
Class which represents a system user.
Definition: User.hpp:55
Concrete class which represents an option Value.
Definition: Options.hpp:50
const system::FilePath & getLoggingDir() const
Gets path where debug logs should be written.
bool enableDebugLogging() const
Gets whether debug logging is activated.
Init & operator()(const char *in_name, Value< T > &in_value, const char *in_description)
Operator which initializes a specific option value.
size_t getMaxMessageSize() const
Gets the maximum allowable size of messages which can be used in communications with the RStudio Laun...
Init(Options &in_owner)
Helper class which initializes Options.
const system::FilePath & getScratchPath() const
Gets the scratch path to which log files and other plugin data may be written.
Error getServerUser(system::User &out_serverUser) const
Gets the user to run as when root privileges are dropped.
size_t getThreadPoolSize() const
Gets the size of the thread pool.
LogLevel
Enum which represents the level of detail at which to log messages.
Definition: Logger.hpp:86
system::TimeDuration getHeartbeatIntervalSeconds() const
Gets the number of seconds between heartbeats.
Class for initializing Options.
Definition: Options.hpp:124
const system::FilePath & getLauncherConfigFile() const
Gets the location of the configuration file for the RStudio Job Launcher.
Class which represents an error.
Definition: Error.hpp:174
bool useUnprivilegedMode() const
Gets whether the plugin should run in single-user unprivileged mode.
Represents an duration of time (e.g. 5 hours, 43 minutes, and 21 seconds) as opposed to a point in ti...
Definition: DateTime.hpp:48
Options for the plugin.
Definition: Options.hpp:118
system::TimeDuration getJobExpiryHours() const
Gets the number of hours after which finished jobs expire and should be pruned from the plugin.
const std::string & getPluginName() const
Gets the name the administrator gave to this instance of the Plugin in the launcher....
Error readOptions(int in_argc, const char *const in_argv[], const system::FilePath &in_location)
Reads the option file, loading all registered options.
const system::FilePath & getRSandboxPath() const
Gets the path to the rsandbox executable provided by the RStudio Workbench installation.
Value()
Default Constructor.
Init registerOptions()
Allows the caller to register their options using the Init helper object.