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:

app

  App

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

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

  use Zing::App;

  my $app = Zing::App->new;

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');

cli

  Cli

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

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

  use Zing::Cli;

  my $cli = Zing::Cli->new;

cursor

  Cursor

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

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

  use Zing::Cursor;
  use Zing::Lookup;

  my $cursor = Zing::Cursor->new(
    lookup => Zing::Lookup->new(
      name => 'people'
    )
  );

daemon

  Daemon

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

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

  use Zing::Cartridge;
  use Zing::Daemon;

  my $daemon = Zing::Daemon->new(
    cartridge => Zing::Cartridge->new(name => 'myapp')
  );

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(name => 'random');

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');

encoder

  Encoder

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

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

  use Zing::Encoder;

  my $encoder = Zing::Encoder->new;

entity

  Entity

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

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

  use Zing::Entity;

  my $app = Zing::Entity->new;

env

  Env

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

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

  use Zing::Env;

  my $env = Zing::Env->new;

error

  Error

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

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

  use Zing::Error;

  my $error = Zing::Error->new;

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);

id

  ID

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

id composition
  InstanceOf["Zing::ID"]
id example #1
  # given: synopsis

  use Zing::ID;

  my $id = Zing::ID->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]);

key

  Key

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

key parent
  Str
key composition
  StrMatch[qr(^[^\:\*]+:[^\:\*]+:[^\:\*]+:[^\:\*]+:[^\:\*]+$)]
key example #1
  # given: synopsis

  "zing:main:global:repo:random"

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 $logic = Zing::Logic->new(process => Zing::Process->new);

lookup

  Lookup

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

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

  use Zing::Lookup;

  my $lookup = Zing::Lookup->new(
    name => 'users'
  );

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(name => 'shared');

meta

  Meta

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

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

  use Zing::Meta;

  my $meta = Zing::Meta->new(name => '$process');

name

  Name

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

name parent
  Str
name composition
  StrMatch[qr(^[^\:\*]+$)]
name example #1
  # given: synopsis

  "main"

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');

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];
  Search

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

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

  use Zing::Search;

  my $search = Zing::Search->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;

table

  Table

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

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

  use Zing::Table;

  my $table = Zing::Table->new(
    name => 'users'
  );

term

  Term

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

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

  bless {}, 'Zing::Term';

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