Module Expr Str Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults vararg kwarg body TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Pass If UnaryOpNot AttributeLoad NameLoad attr body Raise Call NameLoad Str Return Call NameLoad NameLoad NameLoad NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults vararg kwarg body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str Assign NameStore ListLoad Str Str Assign NameStore TupleLoad ListLoad Str Str Str Str Assign NameStore TupleLoad ListLoad Str Str Str Assign NameStore TupleLoad ListLoad Str Str Str Str Assign NameStore TupleLoad ListLoad Str Str Str decorator_list ClassDef bases NameLoad body Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return CompareEq AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr Str If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body If CompareNotIn AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str Str body Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore UnaryOpNot Call AttributeLoad NameLoad attr If BoolOpAnd UnaryOpNot NameLoad CompareIs NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr orelse If NameLoad body Expr Call AttributeLoad NameLoad attr Str orelse Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIn AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str Str body Return Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str For NameStore Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults body For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Expr Call NameLoad orelse Expr Call NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Pass Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore ListComp BinOpAdd Str NameLoad comprehension NameStore TupleLoad Str Str Str Assign NameStore Call NameLoad Str keyword Str keyword Str FunctionDef arguments args NameParam defaults body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type TupleLoad NameLoad NameLoad name NameStore body If CompareNotIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore BinOpAdd Str Call AttributeLoad Str attr AttributeLoad NameLoad attr orelse If Call AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore Str orelse Assign NameStore Str Raise Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list decorator_list
N/A N/A Ginkgo service core

This module implements the core service model and several convenience
decorators to use with your services. The primary export of this module is
`Service`, but much of the implementation is in `BasicService`. `BasicService`
uses a simple state machine defined by `ServiceStateMachine` and implements the
core service interface.

`BasicService` assumes no async model, whereas `Service` creates an
`AsyncManager` from a driver in the `async` module. It's assumed the common
case is to create async applications, but there are cases when you need a
`Service` with no async. For example, `AsyncManager` classes inherit from
`BasicService`, otherwise there would be a circular dependency.

 N/A functools N/A runpy util AbstractStateMachine util defaultproperty N/A Setting require_ready N/A N/A func N/A N/A N/A  Decorator that blocks the call until the service is ready  wrapped N/A N/A self N/A args kwargs N/A N/A N/A N/A N/A N/A N/A self state wait ready N/A self ready_timeout N/A N/A N/A Exception N/A e N/A N/A N/A N/A N/A self ready N/A N/A N/A RuntimeWarning Service must be ready to call this method. N/A N/A func self args kwargs N/A N/A N/A functools wraps func N/A wrapped N/A autospawn N/A N/A func N/A N/A N/A  Decorator that will spawn the call in a local greenlet  wrapped N/A N/A self N/A args kwargs N/A N/A N/A N/A self spawn func self args kwargs N/A N/A N/A functools wraps func N/A wrapped N/A ServiceStateMachine N/A AbstractStateMachine N/A N/A      +------+
            | init |
            +--+---+
               |
               v
      +-------------------+
 +--->|      start()      |
 |    |-------------------|        +-------------------+
 |    |     starting      +---+--->|      stop()       |
 |    +-------------------+   |    |-------------------|
 |             |              |    |     stopping      |
 |             v              |    +-------------------+
 |        +-----------+       |              |
 |        |  ready()  |       |              |
 |        |-----------|       |              v
 |        |   ready   +-------+       +-------------+
 |        +-----------+               |  stopped()  |
 |                                    |-------------|
 +------------------------------------+   stopped   |
                                      +-------------+

    http://www.asciiflow.com/#7278337222084818599/1920677602
     N/A initial_state init N/A allow_wait N/A ready stopped N/A event_start N/A N/A init stopped starting pre_start N/A event_ready N/A N/A starting ready post_start N/A event_stop N/A N/A ready starting stopping pre_stop N/A event_stopped N/A N/A stopping stopped post_stop N/A BasicService N/A object N/A N/A _statemachine_class ServiceStateMachine N/A _children N/A defaultproperty list N/A start_timeout N/A defaultproperty int 2 N/A start_before N/A defaultproperty bool False pre_init N/A N/A self N/A N/A N/A N/A __new__ N/A N/A cls N/A args kwargs N/A N/A s N/A N/A N/A super BasicService cls __new__ cls args kwargs N/A N/A N/A s pre_init N/A N/A s state N/A N/A cls _statemachine_class s N/A s N/A service_name N/A N/A self N/A N/A N/A N/A N/A self __class__ __name__ N/A property ready N/A N/A self N/A N/A N/A N/A N/A N/A self state current ready N/A property add_service N/A N/A self service N/A N/A N/A Add a child service to this service

        The service added will be started when this service starts, before
        its :meth:`_start` method is called. It will also be stopped when this
        service stops, before its :meth:`_stop` method is called.

         N/A N/A N/A N/A self _children append service N/A remove_service N/A N/A self service N/A N/A N/A Remove a child service from this service N/A N/A N/A N/A self _children remove service N/A start N/A N/A self block_until_ready N/A True N/A N/A Starts children and then this service. By default it blocks until ready. N/A N/A N/A self state start N/A N/A self start_before N/A N/A N/A N/A self do_start N/A child N/A self _children N/A N/A N/A N/A N/A child state current N/A ready starting N/A N/A N/A N/A child start block_until_ready N/A N/A N/A self start_before N/A N/A ready N/A N/A N/A self do_start N/A N/A N/A ready N/A block_until_ready True N/A N/A N/A N/A N/A self state wait ready N/A self start_timeout N/A N/A ready N/A N/A N/A N/A self state ready N/A N/A N/A N/A self state ready N/A pre_start N/A N/A self N/A N/A N/A N/A do_start N/A N/A self N/A N/A N/A Empty implementation of service start. Implement me!

        Return `service.NOT_READY` to block until :meth:`set_ready` is
        called (or `ready_timeout` is reached).

         N/A N/A post_start N/A N/A self N/A N/A N/A N/A stop N/A N/A self N/A N/A N/A Stop child services in reverse order and then this service N/A N/A N/A N/A self state current N/A init stopped N/A N/A N/A ready_before_stop N/A self ready N/A N/A N/A self state stop N/A child N/A reversed N/A self _children N/A N/A N/A N/A child stop N/A ready_before_stop N/A N/A N/A N/A self do_stop N/A N/A N/A self state stopped N/A pre_stop N/A N/A self N/A N/A N/A N/A post_stop N/A N/A self N/A N/A N/A N/A do_stop N/A N/A self N/A N/A N/A Empty implementation of service stop. Implement me! N/A N/A reload N/A N/A self N/A N/A _reload_children N/A N/A N/A N/A N/A child N/A self _children N/A N/A N/A N/A child reload N/A N/A N/A self start_before N/A N/A N/A N/A self do_reload N/A N/A _reload_children N/A N/A N/A _reload_children N/A N/A N/A self do_reload N/A do_reload N/A N/A self N/A N/A N/A Empty implementation of service reload. Implement me! N/A N/A serve_forever N/A N/A self N/A N/A N/A Start the service if it hasn't been already started and wait until it's stopped. N/A N/A N/A N/A N/A self start N/A N/A N/A RuntimeWarning N/A e N/A N/A N/A N/A N/A N/A self state wait stopped N/A __enter__ N/A N/A self N/A N/A N/A N/A N/A self start N/A self N/A __exit__ N/A N/A self type value traceback N/A N/A N/A N/A N/A self stop N/A N/A Service N/A BasicService N/A N/A async_available N/A N/A ginkgo.async. m N/A m N/A gevent threading eventlet N/A async N/A Setting async default ginkgo.async.threading help         The async reactor to use. Available choices:
            ginkgo.async.gevent
            ginkgo.async.threading
            ginkgo.async.eventlet
         pre_init N/A N/A self N/A N/A N/A N/A N/A mod N/A N/A runpy run_module N/A self async N/A N/A self async N/A N/A mod N/A AsyncManager N/A N/A N/A self add_service N/A self async N/A N/A N/A N/A NotImplementedError ImportError N/A e N/A N/A N/A N/A self async N/A self async_available N/A N/A helptext N/A Please select a valid async module: 
	 N/A N/A join N/A self async_available N/A N/A N/A N/A N/A self async endswith gevent N/A N/A helptext Please make sure gevent is installed or use a different async manager. N/A N/A helptext N/A N/A RuntimeError N/A N/A Unable to load async manager from {}.
{} format N/A self async helptext N/A spawn N/A N/A self N/A args kwargs N/A N/A N/A N/A N/A self async spawn args kwargs N/A spawn_later N/A N/A self N/A args kwargs N/A N/A N/A N/A N/A self async spawn_later args kwargs N/A N/A