Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shikhalev/drctrl
A local control for DRb service
https://github.com/shikhalev/drctrl
Last synced: about 1 month ago
JSON representation
A local control for DRb service
- Host: GitHub
- URL: https://github.com/shikhalev/drctrl
- Owner: shikhalev
- License: lgpl-3.0
- Created: 2015-02-01T00:25:09.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-30T04:40:58.000Z (over 9 years ago)
- Last Synced: 2024-09-27T09:35:03.879Z (about 2 months ago)
- Language: Ruby
- Homepage:
- Size: 258 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# drctrl
A local control for DRb service.
[![Gem Version](https://badge.fury.io/rb/drctrl.svg)](http://badge.fury.io/rb/drctrl)
[![GitHub license](https://img.shields.io/badge/license-LGPLv3-orange.svg?style=flat)](https://raw.githubusercontent.com/shikhalev/drctrl/master/LICENSE)
[![Code Climate](https://codeclimate.com/github/shikhalev/drctrl/badges/gpa.svg)](https://codeclimate.com/github/shikhalev/drctrl)This gem provides a local dRuby service for control purposes and a command line
tool for it.## Usage
### At server side
```Ruby
require 'drctrl'DRCtrl.start_service do
# some finalize code
end. . . . .
DRCtrl.wait
```
This code creates object with methods `stop` and `restart`. And it starts
a dRuby service at unix-socket `/tmp/-`.Use `DRCtrl.wait` instead `DRb.thread.join` for correct stopping.
### At client side
Use a command line tool `drctrl` or your own code with
`require 'drctrl/client'`.`drctrl` find appropriate dRuby server and send to it command and arguments.
```
drctrl [] []
-U, --uri=URI
-P, --path=PATH
-N, --name=NAME
-I, --pid=PID
```There is required to set one of options: `--uri` (any dRuby URI), `--path`
(a path to unix-socket), or `--name` (name of controlled app).