VERSION | = | '0.7.3' |
LOG_BUFFER_SIZE_DEFAULT | = | 100 |
PID_FILE_DIRECTORY_DEFAULTS | = | ['/var/run/god', '~/.god/pids'] |
DRB_PORT_DEFAULT | = | 17165 |
DRB_ALLOW_DEFAULT | = | ['127.0.0.1'] |
LOG_LEVEL_DEFAULT | = | :info |
contact_groups | [RW] | internal |
contacts | [RW] | internal |
groups | [RW] | internal |
inited | [RW] | internal |
main | [RW] | internal |
pending_watch_states | [RW] | internal |
pending_watches | [RW] | internal |
running | [RW] | internal |
server | [RW] | internal |
watches | [RW] | internal |
Control the lifecycle of the given task(s).
+name+ is the name of a task/group (String) +command+ is the command to run (String) one of: "start" "monitor" "restart" "stop" "unmonitor" "remove"
Returns String[]:task_names
Load the given file(s) according to the given glob.
+glob+ is the glob-enabled path to load
Returns nothing
Match a shortened pattern against a list of String candidates. The pattern is expanded into a regular expression by inserting .* between each character.
+pattern+ is the String containing the abbreviation +list+ is the Array of Strings to match against
Examples
list = %w{ foo bar bars } pattern = 'br' God.pattern_match(list, pattern) # => ['bar', 'bars']
Returns String[]:matched_elements
Load a config file into a running god instance. Rescues any exceptions that the config may raise and reports these back to the caller.
+code+ is a String containing the config file +filename+ is the filename of the config file
Returns [String[]:task_names, String:errors]
Log lines for the given task since the specified time.
+watch_name+ is the name of the task (may be abbreviated) +since+ is the Time since which to report log lines
Raises God::NoSuchWatchError if no tasks matched
Returns String:joined_log_lines
Unmonitor and stop all tasks.
Returns true on success
false if all tasks could not be stopped within 10 seconds
Force the termination of god.
* Clean up pid file if one exists * Stop DRb service * Hard exit using exit!
Never returns because the process will no longer exist!