-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathsqs_processor.rbs
More file actions
47 lines (40 loc) · 1.45 KB
/
sqs_processor.rbs
File metadata and controls
47 lines (40 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
module ElasticGraph
module IndexerLambda
class SqsProcessor
interface _EventPayloadDecoder
def decode_events: (
sqs_record: ::Hash[::String, untyped],
body: ::String
) -> ::Array[::Hash[::String, untyped]]
end
interface _MessageBodyLoader
def load_body: (
sqs_record: ::Hash[::String, untyped]
) -> ::String
end
def initialize: (
Indexer::Processor,
logger: ::Logger,
ignore_sqs_latency_timestamps_from_arns: ::Set[::String],
?event_payload_decoder: _EventPayloadDecoder,
?message_body_loader: _MessageBodyLoader,
) -> void
def process: (
::Hash[::String, untyped],
?refresh_indices: bool
) -> {"batchItemFailures" => ::Array[{"itemIdentifier" => ::String}]}
private
@indexer_processor: Indexer::Processor
@logger: ::Logger
@event_payload_decoder: _EventPayloadDecoder
@message_body_loader: _MessageBodyLoader
attr_reader ignore_sqs_latency_timestamps_from_arns: ::Set[::String]
def events_from: (::Hash[::String, untyped]) -> ::Array[::Hash[::String, untyped]]
def extract_sqs_metadata: (::Hash[String, untyped]) -> ::Hash[::String, untyped]
def millis_to_iso8601: (::String) -> ::String?
def format_response: (
::Array[Indexer::FailedEventError]
) -> {"batchItemFailures" => ::Array[{"itemIdentifier" => ::String}]}
end
end
end