The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Zing::Types - Type Library

ABSTRACT

Type Library

SYNOPSIS

  package main;

  use Zing::Types;

  1;

DESCRIPTION

This package provides type constraint for the Zing process management system.

LIBRARIES

This package uses type constraints from:

Types::Standard

CONSTRAINTS

This package declares the following type constraints:

channel

  Channel

This type is defined in the Zing::Types library.

channel parent
  Object
channel composition
  InstanceOf["Zing::Channel"]
channel example #1
  # given: synopsis

  use Zing::Channel;

  my $chan = Zing::Channel->new(name => 'share');

data

  Data

This type is defined in the Zing::Types library.

data parent
  Object
data composition
  InstanceOf["Zing::Data"]
data example #1
  # given: synopsis

  use Zing::Data;
  use Zing::Process;

  my $data = Zing::Data->new(process => Zing::Process->new);

domain

  Domain

This type is defined in the Zing::Types library.

domain parent
  Object
domain composition
  InstanceOf["Zing::Domain"]
domain example #1
  # given: synopsis

  use Zing::Domain;

  my $domain = Zing::Domain->new(name => 'exchange');

flow

  Flow

This type is defined in the Zing::Types library.

flow parent
  Object
flow composition
  InstanceOf["Zing::Flow"]
flow example #1
  # given: synopsis

  use Zing::Flow;

  my $flow = Zing::Flow->new(name => 'step_1', code => sub {1});

fork

  Fork

This type is defined in the Zing::Types library.

fork parent
  Object
fork composition
  InstanceOf["Zing::Fork"]
fork example #1
  # given: synopsis

  use Zing::Fork;
  use Zing::Process;

  my $scheme = ['MyApp', [], 1];
  my $fork = Zing::Fork->new(scheme => $scheme, parent => Zing::Process->new);

interupt

  Interupt

This type is defined in the Zing::Types library.

interupt composition
  Enum[qw(CHLD HUP INT QUIT TERM USR1 USR2)]
interupt example #1
  # given: synopsis

  'QUIT'

kernel

  Kernel

This type is defined in the Zing::Types library.

kernel parent
  Object
kernel composition
  InstanceOf["Zing::Kernel"]
kernel example #1
  # given: synopsis

  use Zing::Kernel;

  my $kernel = Zing::Kernel->new(scheme => ['MyApp', [], 1]);

keyval

  KeyVal

This type is defined in the Zing::Types library.

keyval parent
  Object
keyval composition
  InstanceOf["Zing::KeyVal"]
keyval example #1
  # given: synopsis

  use Zing::KeyVal;

  my $keyval = Zing::KeyVal->new(name => 'notes');

logger

  Logger

This type is defined in the Zing::Types library.

logger parent
  Object
logger composition
  InstanceOf["Zing::Logger"]
logger example #1
  # given: synopsis

  use FlightRecorder;

  my $logger = FlightRecorder->new;

logic

  Logic

This type is defined in the Zing::Types library.

logic parent
  Object
logic composition
  InstanceOf["Zing::Logic"]
logic example #1
  # given: synopsis

  use Zing::Logic;
  use Zing::Process;

  my $process = Zing::Process->new;
  my $logic = Zing::Logic->new(process => $process);

loop

  Loop

This type is defined in the Zing::Types library.

loop parent
  Object
loop composition
  InstanceOf["Zing::Loop"]
loop example #1
  # given: synopsis

  use Zing::Flow;
  use Zing::Loop;

  my $loop = Zing::Loop->new(
    flow => Zing::Flow->new(name => 'init', code => sub {1})
  );

mailbox

  Mailbox

This type is defined in the Zing::Types library.

mailbox parent
  Object
mailbox composition
  InstanceOf["Zing::Mailbox"]
mailbox example #1
  # given: synopsis

  use Zing::Mailbox;
  use Zing::Process;

  my $mailbox = Zing::Mailbox->new(process => Zing::Process->new);

node

  Node

This type is defined in the Zing::Types library.

node parent
  Object
node composition
  InstanceOf["Zing::Node"]
node example #1
  # given: synopsis

  use Zing::Node;

  my $node = Zing::Node->new;

poll

  Poll

This type is defined in the Zing::Types library.

poll parent
  Object
poll composition
  InstanceOf["Zing::Poll"]
poll example #1
  # 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

  Process

This type is defined in the Zing::Types library.

process parent
  Object
process composition
  InstanceOf["Zing::Process"]
process example #1
  # given: synopsis

  use Zing::Process;

  my $process = Zing::Process->new;

pubsub

  PubSub

This type is defined in the Zing::Types library.

pubsub parent
  Object
pubsub composition
  InstanceOf["Zing::PubSub"]
pubsub example #1
  # given: synopsis

  use Zing::PubSub;

  my $pubsub = Zing::PubSub->new(name => 'tasks');

queue

  Queue

This type is defined in the Zing::Types library.

queue parent
  Object
queue composition
  InstanceOf["Zing::Queue"]
queue example #1
  # given: synopsis

  use Zing::Queue;

  my $queue = Zing::Queue->new(name => 'tasks');

redis

  Redis

This type is defined in the Zing::Types library.

redis parent
  Object
redis composition
  InstanceOf["Zing::Redis"]
redis example #1
  # given: synopsis

  bless {}, 'Redis';

registry

  Registry

This type is defined in the Zing::Types library.

registry parent
  Object
registry composition
  InstanceOf["Zing::Registry"]
registry example #1
  # given: synopsis

  use Zing::Process;
  use Zing::Registry;

  my $process = Zing::Process->new;
  my $registry = Zing::Registry->new(process => $process);

repo

  Repo

This type is defined in the Zing::Types library.

repo parent
  Object
repo composition
  InstanceOf["Zing::Repo"]
repo example #1
  # given: synopsis

  use Zing::Repo;

  my $repo = Zing::Repo->new(name => 'repo');

schedule

  Schedule

This type is defined in the Zing::Types library.

schedule composition
  Tuple[Str, ArrayRef[Str], HashRef]
schedule example #1
  # given: synopsis

  # at 00:00 on day-of-month 1 in january

  ['0 0 1 1 *', ['task_queue'], { task => 'execute' }];
schedule example #2
  # given: synopsis

  # at 00:00 on saturday

  ['0 0 * * SAT', ['task_queue'], { task => 'execute' }];
schedule example #3
  # given: synopsis

  # at minute 0 (hourly)

  ['0 * * * *', ['task_queue'], { task => 'execute' }];

scheme

  Scheme

This type is defined in the Zing::Types library.

scheme composition
  Tuple[Str, ArrayRef, Int]
scheme example #1
  # given: synopsis

  ['MyApp', [], 1_000];

server

  Server

This type is defined in the Zing::Types library.

server parent
  Object
server composition
  InstanceOf["Zing::Server"]
server example #1
  # given: synopsis

  use Zing::Server;

  my $server = Zing::Server->new;

space

  Space

This type is defined in the Zing::Types library.

space parent
  Object
space composition
  InstanceOf["Zing::Space"]
space example #1
  # given: synopsis

  use Data::Object::Space;

  Data::Object::Space->new('MyApp');

store

  Store

This type is defined in the Zing::Types library.

store parent
  Object
store composition
  InstanceOf["Zing::Store"]
store example #1
  # given: synopsis

  use Zing::Store;

  my $store = Zing::Store->new;

watcher

  Watcher

This type is defined in the Zing::Types library.

watcher parent
  Object
watcher composition
  InstanceOf["Zing::Watcher"]
watcher example #1
  # given: synopsis

  bless {}, 'Zing::Watcher';

worker

  Worker

This type is defined in the Zing::Types library.

worker parent
  Object
worker composition
  InstanceOf["Zing::Worker"]
worker example #1
  # given: synopsis

  bless {}, 'Zing::Worker';

zing

  Zing

This type is defined in the Zing::Types library.

zing parent
  Object
zing composition
  InstanceOf["Zing::Zing"]
zing example #1
  # given: synopsis

  use Zing;

  my $zing = Zing->new(scheme => ['MyApp', [], 1]);

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