| 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::Async; | ||||||||||
| 6 | |||||||||||
| 7 | 60 | our $VERSION = '7.30_1'; | |||||||||
| 8 | 60 | ▶ | use Search::Elasticsearch 7.00; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 60 | ▶ | use Promises 0.93 (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 60 | ▶ | use parent 'Search::Elasticsearch'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 60 | ▶ | use Search::Elasticsearch::Util qw(parse_params); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | 60 | ▶ | use namespace::clean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | |||||||||||
| 15 | |||||||||||
| 16 | #=================================== | ||||||||||
| 17 | sub new { | ||||||||||
| 18 | #=================================== | ||||||||||
| 19 | 80 | ▶ | my ( $class, $params ) = parse_params(@_); | ||||||||
|
Subroutine
new: called CC=3 SCAR=11.2
Pod
undocumented
| |||||||||||
| 20 | 80 | my $self = $class->SUPER::new( | |||||||||
| 21 | { cxn_pool => 'Async::Static', | ||||||||||
| 22 | transport => 'Async', | ||||||||||
| 23 | cxn => 'AEHTTP', | ||||||||||
| 24 | %$params | ||||||||||
| 25 | } | ||||||||||
| 26 | ); | ||||||||||
| 27 | 80 | ▶ | unless ( $self->bulk_helper_class ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | 80 | $self->bulk_helper_class( | |||||||||
| 29 | 'Client::' . $self->api_version . '::Async::Bulk' ); | ||||||||||
| 30 | } | ||||||||||
| 31 | 80 | ▶ | unless ( $self->scroll_helper_class ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 32 | 80 | $self->scroll_helper_class( | |||||||||
| 33 | 'Client::' . $self->api_version . '::Async::Scroll' ); | ||||||||||
| 34 | } | ||||||||||
| 35 | 80 | return $self; | |||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | 60 | 1; | |||||||||
| 39 | |||||||||||
| 40 | # ABSTRACT: Async API for Elasticsearch using Promises | ||||||||||
| 41 | |||||||||||
| 42 | __END__ | ||||||||||