UnixSockListeningApp

Undocumented in source.

Constructors

this
this()
Undocumented in source.

Members

Functions

run
int run(Arguments args, ConfigParser config)
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From DaemonApp

Arguments
alias Arguments = ocean.text.Arguments.Arguments
Undocumented in source.
ConfigParser
alias ConfigParser = ocean.util.config.ConfigParser.ConfigParser
Undocumented in source.
args
Arguments args;

Command line arguments used by the application.

args_ext
ArgumentsExt args_ext;

Command line arguments extension used by the application.

config
ConfigParser config;

Configuration parser to use to parse the configuration files.

config_ext
ConfigExt config_ext;

Configuration parsing extension instance.

log_ext
LogExt log_ext;

Logging extension instance.

ver
VersionInfo ver;

Version information.

ver_ext
VersionArgsExt ver_ext;

Version information extension.

stats_ext
StatsExt stats_ext;

Stats log extension -- TODO auto configured or what? Why public? getter for StatsLog instance?

timer_ext
TimerExt timer_ext;

Timer handler extension.

signal_ext
SignalExt signal_ext;

Signal handler extension. Directs registered signals to the onSignal() method.

reopenable_files_ext
ReopenableFilesExt reopenable_files_ext;

Reopenable files extension. Hooks into the stats, log, and signal extentions, and automatically reopens logfiles upon receipt of the SIGHUP signal (presumably sent from logrotate).

pidlock_ext
PidLockExt pidlock_ext;

PidLock extension. Tries to create and lock the pid lock file (if specified in the config), ensuring that only one application instance per pidlock may exist.

unix_socket_ext
UnixSocketExt unix_socket_ext;

Unix socket extension to register commands for the application to respond to.

task_ext
TaskExt task_ext;

Extension to start run method inside a task.

OptionalSettings
struct OptionalSettings

Struct containing optional constructor arguments. There are enough of these that handling them as default arguments to the ctor is cumbersome.

startEventHandling
void startEventHandling(EpollSelectDispatcher epoll)

This method must be called in order for signal and timer event handling to start being processed. As it registers clients (the stats timer and signal handler) with epoll which will always reregister themselves after firing, you should call this method when you are about to start your application's main event loop.

run
int run(istring[] args)

Run implementation that forwards to the abstract run(Arguments, ConfigParser).

run
int run(Arguments args, ConfigParser config)

This method must be implemented by subclasses to do the actual application work.

exit
void exit(int status, istring msg)
void exit(int status, istring msg, Logger logger)

Exit cleanly from the application, passing the specified return code to the OS and optionally printing the specified message to the console.

reportSystemStats
void reportSystemStats()

Collects CPU and memory stats and reports it to stats log. Should be called periodically (inside onStatsTimer).

collectSystemStats
void collectSystemStats(Collector prometheus_collector)

Collects CPU and memory stats for incoming prometheus' requests. Should be sent, as a callback, to the CollectorRegistry instance used in prometheus request listener.

reportGCStats
void reportGCStats()

Collects GC stats and reports them to stats log. Should be called periodically (inside onStatsTimer).

collectGCStats
void collectGCStats(Collector prometheus_collector)

Collects GC stats for incoming prometheus' requests. Should be sent, as a callback, to the CollectorRegistry instance used in prometheus request listener.

onStatsTimer
void onStatsTimer()

Called by the timer extension when the stats period fires. By default does nothing, but should be overridden to write the required stats.

onSignal
void onSignal(int signum)

ISignalExtExtension method default implementation.

setupArgs
void setupArgs(IApplication app, Arguments args)
preValidateArgs
void preValidateArgs(IApplication app, Arguments args)
validateArgs
cstring validateArgs(IApplication app, Arguments args)
processArgs
void processArgs(IApplication app, Arguments args)

IArgumentsExtExtension methods dummy implementation.

preParseConfig
void preParseConfig(IApplication app, ConfigParser config)
filterConfigFiles
istring[] filterConfigFiles(IApplication app, ConfigParser config, istring[] files)
processConfig
void processConfig(IApplication app, ConfigParser config)

IConfigExtExtension methods dummy implementation.

preConfigureLoggers
void preConfigureLoggers(IApplication app, ConfigParser config, bool loose_config_parsing, bool use_insert_appender)
postConfigureLoggers
void postConfigureLoggers(IApplication app, ConfigParser config, bool loose_config_parsing, bool use_insert_appender)

ILogExtExtension methods dummy implementation.

Meta