NAME
OpenTracing::Types - Type constraints for checking Interfaces
SYNOPSIS
use OpenTracing::Types qw/Span/;
#
# imports the 'Span' Type
use Types::Standard qw/Maybe/;
use Types::Common::Numeric qw/PositiveOrZeroNum/;
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
new_child_ofnew_follows_fromget_referenced_contexttype_is_child_oftype_is_follows_from
See also "INSTANCE METHODS" in OpenTracing::Interface::ContextReference and "CONSTRUCTOR METHODS" in OpenTracing::Interface::ContextReference.
Scope
closeget_span
See also "INSTANCE METHODS" in OpenTracing::Interface::Scope.
ScopeManager
activate_spanget_active_scope
See also "INSTANCE METHODS" in OpenTracing::Interface::ScopeManager.
Span
get_contextoverwrite_operation_namefinishset_taglog_dataadd_baggage_itemget_baggage_item
See also "INSTANCE METHODS" in OpenTracing::Interface::Span.
SpanContext
get_baggage_itemwith_baggage_item
See also "INSTANCE METHODS" in OpenTracing::Interface::SpanContext.
Tracer
get_scope_managerget_active_spanstart_active_spanstart_spaninject_contextextract_context
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.