| 1 | package OpenTracing::Constants::CarrierFormat; | ||
| 2 | use strict; | ||
| 3 | use warnings; | ||
| 4 | use parent 'Exporter'; | ||
| 5 | use Package::Constants; | ||
| 6 | |||
| 7 | use constant { | ||
| 8 | OPENTRACING_CARRIER_FORMAT_HTTP_HEADERS => 'HTTP_HEADERS', | ||
| 9 | OPENTRACING_CARRIER_FORMAT_BINARY => 'BINARY', | ||
| 10 | OPENTRACING_CARRIER_FORMAT_TEXT => 'TEXT_MAP', | ||
| 11 | }; | ||
| 12 | |||
| 13 | our @EXPORT_OK = Package::Constants->list(__PACKAGE__); | ||
| 14 | our %EXPORT_TAGS = (ALL => \@EXPORT_OK); | ||
| 15 | |||
| 16 | 1; | ||
| 17 | |||
| 18 | __END__ | ||
| 19 | |||
| 20 | =pod | ||
| 21 | |||
| 22 | =head1 NAME | ||
| 23 | |||
| 24 | OpenTracing::Constants::CarrierFormat - constants for carrier formats | ||
| 25 | |||
| 26 | =head1 SYNOPSIS | ||
| 27 | |||
| 28 | use OpenTracing::Constants::CarrierFormat ':ALL'; | ||
| 29 | |||
| 30 | or just the ones you need: | ||
| 31 | |||
| 32 | use OpenTracing::Constants::CarrierFormat | ||
| 33 | qw/OPENTRACING_CARRIER_FORMAT_HTTP_HEADERS/; | ||
| 34 | |||
| 35 | =head1 CONSTANTS | ||
| 36 | |||
| 37 | This package doesn't export anything by default, you can use the C<:ALL> | ||
| 38 | tag to get all provided constants or ask for specific ones. | ||
| 39 | The following constants are provided: | ||
| 40 | |||
| 41 | =head2 OPENTRACING_CARRIER_FORMAT_TEXT | ||
| 42 | |||
| 43 | This format represents a SpanContext as hash with string values, | ||
| 44 | with no restrictions for keys and value contents | ||
| 45 | (unlike OPENTRACING_CARRIER_FORMAT_HTTP_HEADERS). | ||
| 46 | |||
| 47 | =head2 OPENTRACING_CARRIER_FORMAT_HTTP_HEADERS | ||
| 48 | |||
| 49 | This format represents a SpanContext as key-value pairs, | ||
| 50 | similarly to L<OPENTRACING_CARRIER_FORMAT_TEXT>. | ||
| 51 | However, both keys and values must be suitable for use as | ||
| 52 | HTTP headers (without modification or further escaping). | ||
| 53 | |||
| 54 | =head2 OPENTRACING_CARRIER_FORMAT_BINARY | ||
| 55 | |||
| 56 | This format represents a SpanContext as an opaque binary structure. | ||
| 57 | |||
| 58 | =cut |