Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Ubic::Service::Common(User Contributed Perl DocumentatUbic::Service::Common(3)

NAME
       Ubic::Service::Common - common way to construct new service by
       specifying several callbacks

VERSION
       version 1.58

SYNOPSIS
	   $service = Ubic::Service::Common->new({
	       start =>	sub {
		   # implementation-specific
	       },
	       stop => sub {
		   # implementation-specific
	       },
	       status => sub {
		   # implementation-specific
	       },
	       name => "my-service",
	       port => 1234,
	   });
	   $service->start;

DESCRIPTION
       Each service should provide safe	"start()", "stop()" and	"status()"
       methods.

CONSTRUCTOR
       Ubic::Service::Common->new($params)
	   Construct service object.

	   Possible parameters:

	   start
	       Mandatory sub reference providing service start mechanism.

	   stop
	       The same	for stop.

	   status
	       Mandatory sub reference checking	if service is alive.

	       It should return	one of "running", "not running", "broken"
	       values.

	       This code will be used as safety	check against double start and
	       in watchdog checks.

	   name
	       Service's name.

	       Optional, will usually be set by	upper-level multiservice.
	       Don't set it unless you know what you're	doing.

	   user
	       User under which	daemon will be started.	Optional, default is
	       "root".

	   group
	       Group under which daemon	will be	started. Optional, default is
	       all user	groups.

	       Value can be scalar or arrayref.

	   port
	       Service's port.

AUTHOR
       Vyacheslav Matyukhin <mmcleric@yandex-team.ru>

COPYRIGHT AND LICENSE
       This software is	copyright (c) 2015 by Yandex LLC.

       This is free software; you can redistribute it and/or modify it under
       the same	terms as the Perl 5 programming	language system	itself.

perl v5.24.1			  2015-01-27	      Ubic::Service::Common(3)

NAME | VERSION | SYNOPSIS | DESCRIPTION | CONSTRUCTOR | AUTHOR | COPYRIGHT AND LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Ubic::Service::Common&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help