Zing::Types - Type Library
Type Library
package main; use Zing::Types; 1;
This package provides type constraint for the Zing process management system.
This package uses type constraints from:
Types::Standard
This package declares the following type constraints:
Channel
This type is defined in the Zing::Types library.
Object
InstanceOf["Zing::Channel"]
# given: synopsis use Zing::Channel; my $chan = Zing::Channel->new(name => 'share');
Data
InstanceOf["Zing::Data"]
# given: synopsis use Zing::Data; use Zing::Process; my $data = Zing::Data->new(process => Zing::Process->new);
Domain
InstanceOf["Zing::Domain"]
# given: synopsis use Zing::Domain; my $domain = Zing::Domain->new(name => 'exchange');
Flow
InstanceOf["Zing::Flow"]
# given: synopsis use Zing::Flow; my $flow = Zing::Flow->new(name => 'step_1', code => sub {1});
Fork
InstanceOf["Zing::Fork"]
# given: synopsis use Zing::Fork; use Zing::Process; my $scheme = ['MyApp', [], 1]; my $fork = Zing::Fork->new(scheme => $scheme, parent => Zing::Process->new);
Interupt
Enum[qw(CHLD HUP INT QUIT TERM USR1 USR2)]
# given: synopsis 'QUIT'
Kernel
InstanceOf["Zing::Kernel"]
# given: synopsis use Zing::Kernel; my $kernel = Zing::Kernel->new(scheme => ['MyApp', [], 1]);
KeyVal
InstanceOf["Zing::KeyVal"]
# given: synopsis use Zing::KeyVal; my $keyval = Zing::KeyVal->new(name => 'notes');
Logger
InstanceOf["Zing::Logger"]
# given: synopsis use FlightRecorder; my $logger = FlightRecorder->new;
Logic
InstanceOf["Zing::Logic"]
# given: synopsis use Zing::Logic; use Zing::Process; my $process = Zing::Process->new; my $logic = Zing::Logic->new(process => $process);
Loop
InstanceOf["Zing::Loop"]
# given: synopsis use Zing::Flow; use Zing::Loop; my $loop = Zing::Loop->new( flow => Zing::Flow->new(name => 'init', code => sub {1}) );
Mailbox
InstanceOf["Zing::Mailbox"]
# given: synopsis use Zing::Mailbox; use Zing::Process; my $mailbox = Zing::Mailbox->new(process => Zing::Process->new);
Node
InstanceOf["Zing::Node"]
# given: synopsis use Zing::Node; my $node = Zing::Node->new;
Poll
InstanceOf["Zing::Poll"]
# given: synopsis use Zing::Poll; use Zing::KeyVal; my $keyval = Zing::KeyVal->new(name => 'notes'); my $poll = Zing::Poll->new(name => 'last-week', repo => $keyval);
Process
InstanceOf["Zing::Process"]
# given: synopsis use Zing::Process; my $process = Zing::Process->new;
PubSub
InstanceOf["Zing::PubSub"]
# given: synopsis use Zing::PubSub; my $pubsub = Zing::PubSub->new(name => 'tasks');
Queue
InstanceOf["Zing::Queue"]
# given: synopsis use Zing::Queue; my $queue = Zing::Queue->new(name => 'tasks');
Redis
InstanceOf["Zing::Redis"]
# given: synopsis bless {}, 'Redis';
Registry
InstanceOf["Zing::Registry"]
# given: synopsis use Zing::Process; use Zing::Registry; my $process = Zing::Process->new; my $registry = Zing::Registry->new(process => $process);
Repo
InstanceOf["Zing::Repo"]
# given: synopsis use Zing::Repo; my $repo = Zing::Repo->new(name => 'repo');
Schedule
Tuple[Str, ArrayRef[Str], HashRef]
# given: synopsis # at 00:00 on day-of-month 1 in january ['0 0 1 1 *', ['task_queue'], { task => 'execute' }];
# given: synopsis # at 00:00 on saturday ['0 0 * * SAT', ['task_queue'], { task => 'execute' }];
# given: synopsis # at minute 0 (hourly) ['0 * * * *', ['task_queue'], { task => 'execute' }];
Scheme
Tuple[Str, ArrayRef, Int]
# given: synopsis ['MyApp', [], 1_000];
Server
InstanceOf["Zing::Server"]
# given: synopsis use Zing::Server; my $server = Zing::Server->new;
Space
InstanceOf["Zing::Space"]
# given: synopsis use Data::Object::Space; Data::Object::Space->new('MyApp');
Store
InstanceOf["Zing::Store"]
# given: synopsis use Zing::Store; my $store = Zing::Store->new;
Watcher
InstanceOf["Zing::Watcher"]
# given: synopsis bless {}, 'Zing::Watcher';
Worker
InstanceOf["Zing::Worker"]
# given: synopsis bless {}, 'Zing::Worker';
Zing
InstanceOf["Zing::Zing"]
# given: synopsis use Zing; my $zing = Zing->new(scheme => ['MyApp', [], 1]);
Al Newkirk, awncorp@cpan.org
awncorp@cpan.org
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".
Wiki
Project
Initiatives
Milestones
Contributing
Issues
To install Zing, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Zing
CPAN shell
perl -MCPAN -e shell install Zing
For more information on module installation, please visit the detailed CPAN module installation guide.