NAME
OpenTracing::Types - Type constraints for checking Interfaces
SYNOPSIS
#
# imports the 'Span' Type
use
Function::Parameters;
use
Function::Return;
# create a subroutine with some fancy type checks
#
sub
time_gap (Span
$span1
, Span
$span2
) :Return Maybe[PositiveOrZeroNum] {
return
unless
$span1
->finish_time and
$span2
->start_time;
return
$span2
->start_time -
$span1
->finish_time
}
DESCRIPTION
This library of Type::Tiny type constraints provide Duck Type checks for all common elements that conform OpenTracing::Interface
See "Export" in Type::Library about the various ways to import types an related methods.
TYPES
The following Duck Types are being defined with the mentioned required methods:
ContextReference
See also "INSTANCE METHODS" in OpenTracing::Interface::ContextReference and "CONSTRUCTOR METHODS" in OpenTracing::Interface::ContextReference.
Scope
See also "INSTANCE METHODS" in OpenTracing::Interface::Scope.
ScopeManager
See also "INSTANCE METHODS" in OpenTracing::Interface::ScopeManager.
Span
See also "INSTANCE METHODS" in OpenTracing::Interface::Span.
SpanContext
See also "INSTANCE METHODS" in OpenTracing::Interface::SpanContext.
Tracer
See also "INSTANCE METHODS" in OpenTracing::Interface::Tracer.
AUTHOR
Theo van Hoesel <tvanhoesel@perceptyx.com>
COPYRIGHT AND LICENSE
'OpenTracing Types' is Copyright (C) 2020 .. 2021, Perceptyx Inc
This library is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.
This library is distributed in the hope that it will be useful, but it is provided "as is" and without any express or implied warranties.
For details, see the full text of the license in the file LICENSE.