NAME

Zing::Spawner - Scheme Spawner

ABSTRACT

Scheme Spawning Worker Process

SYNOPSIS

package Spawner;

use parent 'Zing::Spawner';

sub queues {
  ['schemes']
}

package main;

my $spawner = Spawner->new;

# $spawner->execute;

DESCRIPTION

This package provides a worker process which loads, instantiates, and executes schemes received as messages.

INHERITS

This package inherits behaviors from:

Zing::Worker

LIBRARIES

This package uses type constraints from:

Zing::Types

METHODS

This package implements the following methods:

handle

handle(Str $name, HashRef $data) : Object

The handle method is executed whenever the process receive a new message, and receives the queue name and data as arguments.

handle example #1
# given: synopsis

$spawner->handle('schemes', { scheme => ['MyApp', [], 1] });
handle example #2
# given: synopsis

$spawner->handle('schemes', { scheme => ['MyApp', [], 4] });

AUTHOR

Al Newkirk, awncorp@cpan.org

LICENSE

Copyright (C) 2011-2019, Al Newkirk, et al.

This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".

PROJECT

Wiki

Project

Initiatives

Milestones

Contributing

Issues