line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Licensed to Elasticsearch B.V under one or more agreements. |
2
|
|
|
|
|
|
|
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License. |
3
|
|
|
|
|
|
|
# See the LICENSE file in the project root for more information |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Search::Elasticsearch::Role::Client; |
6
|
|
|
|
|
|
|
$Search::Elasticsearch::Role::Client::VERSION = '7.717'; |
7
|
55
|
|
|
55
|
|
23061
|
use Moo::Role; |
|
55
|
|
|
|
|
123
|
|
|
55
|
|
|
|
|
290
|
|
8
|
55
|
|
|
55
|
|
15399
|
use namespace::clean; |
|
55
|
|
|
|
|
103
|
|
|
55
|
|
|
|
|
282
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
requires 'parse_request'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has 'transport' => ( is => 'ro', required => 1 ); |
13
|
|
|
|
|
|
|
has 'logger' => ( is => 'ro', required => 1 ); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
#=================================== |
16
|
|
|
|
|
|
|
sub perform_request { |
17
|
|
|
|
|
|
|
#=================================== |
18
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
19
|
0
|
|
|
|
|
|
my $request = $self->parse_request(@_); |
20
|
0
|
|
|
|
|
|
return $self->transport->perform_request($request); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=pod |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=encoding UTF-8 |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 NAME |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Search::Elasticsearch::Role::Client - Provides common functionality for Client implementations |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 VERSION |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
version 7.717 |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 DESCRIPTION |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
This role provides a common C method for Client |
40
|
|
|
|
|
|
|
implementations. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 METHODS |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 C |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
This method takes whatever arguments it is passed and passes them directly to |
47
|
|
|
|
|
|
|
a C method (which should be provided by Client implementations). |
48
|
|
|
|
|
|
|
The C method should return a request suitable for passing |
49
|
|
|
|
|
|
|
to L. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 AUTHOR |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Enrico Zimuel |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
This software is Copyright (c) 2022 by Elasticsearch BV. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
This is free software, licensed under: |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
The Apache License, Version 2.0, January 2004 |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=cut |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
__END__ |