Ubic::Multiservice - interface of multiservice representing several named services
version 1.10
$service = $multiservice->service("yandex.yandex-ppb-people-pt.meta-all"); @services = $multiservice->services();
Multiservice's interface consists of two fundamental methods: service($name) to get service by it's name, and services() to get list of all services.
service($name)
services()
Additionally, you can check whether multiservice contains service without instantiating it, using has_service($name) method.
has_service($name)
Remember that althouth multiservice is currently a service too, it doesn't implement start/stop/status methods. This is because user will usually want to see action's progress, and all output policy is defined in Ubic::Cmd class; interaction protocol between this class and Ubic::Cmd class would be too hard to code.
Ubic::Cmd
Get service by name.
This class provides common implementation which can delegate searching of subservices to multiservices (don't panic!), so subclasses should implement simple_service instead.
simple_service
This method should be implemented by subclass.
Check whether service with specified name exists in this multiservice.
Like service, subclasses should usually implement has_simple_service instead.
service
has_simple_service
Construct all subservices. Because they are top-level, we don't need simple_services().
simple_services()
By default, it uses service_names to get list of services.
service_names
Get list with names of all subservices.
Subclasses should usually override this method, services uses it in default implementation.
services
Get multiop operation mode of object. There are three possible values which this method can return:
start, stop, restart actions for this module start/stop/restart all subservices.
start
stop
restart
-f flag in ubic(1) binary is required to call any action.
ubic(1) binary will refuse to start/stop/restart this multiservice.
Ubic::Multiservice::Simple - class for defining simple multiservices.
Ubic::Multiservice::Dir - multiservice which loads service configs from files.
Vyacheslav Matjukhin <mmcleric@yandex-team.ru>
To install Ubic, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Ubic
CPAN shell
perl -MCPAN -e shell install Ubic
For more information on module installation, please visit the detailed CPAN module installation guide.