Sha256: cc41c31d3591782e9dd549b8ccbcc3e3886e516ad069fa2490ef2e5f78f9fef9
Contents?: true
Size: 719 Bytes
Versions: 1
Compression:
Stored size: 719 Bytes
Contents
# encoding: utf-8 require "logstash/util/loggable" java_import java.util.function.Function java_import com.microsoft.azure.eventhubs.EventPosition java_import java.time.Instant module LogStash module Inputs module Azure class LookBackPositionProvider include Function include LogStash::Util::Loggable def initialize(look_back_seconds) @logger = self.logger @look_back = Instant.ofEpochSecond(Instant.now.getEpochSecond - look_back_seconds.to_i) @logger.debug("Look back date/time: #{@look_back}") end def apply(t) EventPosition.fromEnqueuedTime(@look_back); end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
logstash-input-azureiothub-0.1.15 | lib/logstash/inputs/look_back_position_provider.rb |