Skip to content
A local control for DRb service
Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib
.yardopts
LICENSE
README.md
drctrl.gemspec
drctrl.gemvers

README.md

drctrl

A local control for DRb service.

Gem Version GitHub license Code Climate

This gem provides a local dRuby service for control purposes and a command line tool for it.

Usage

At server side

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/<appname>-<pid>.

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 [<options>] <command> [<args>]
    -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).

You can’t perform that action at this time.