Class: LogStash::Inputs::RegistryItem

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/inputs/azureblob.rb

Overview

require Dir[ File.dirname(__FILE__) + “/../../*_jars.rb” ].first Registry item to coordinate between mulitple clients

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_path, etag, reader, offset = 0, gen = 0) ⇒ RegistryItem

to_json



31
32
33
34
35
36
37
# File 'lib/logstash/inputs/azureblob.rb', line 31

def initialize(file_path, etag, reader, offset = 0, gen = 0)
  @file_path = file_path
  @etag = etag
  @reader = reader
  @offset = offset
  @gen = gen
end

Instance Attribute Details

#etagObject

Returns the value of attribute etag.



15
16
17
# File 'lib/logstash/inputs/azureblob.rb', line 15

def etag
  @etag
end

#file_pathObject

Returns the value of attribute file_path.



15
16
17
# File 'lib/logstash/inputs/azureblob.rb', line 15

def file_path
  @file_path
end

#genObject

Returns the value of attribute gen.



15
16
17
# File 'lib/logstash/inputs/azureblob.rb', line 15

def gen
  @gen
end

#offsetObject

Returns the value of attribute offset.



15
16
17
# File 'lib/logstash/inputs/azureblob.rb', line 15

def offset
  @offset
end

#readerObject

Returns the value of attribute reader.



15
16
17
# File 'lib/logstash/inputs/azureblob.rb', line 15

def reader
  @reader
end

Instance Method Details

#as_json(options = {}) ⇒ Object

Allow json serialization.



17
18
19
20
21
22
23
24
25
# File 'lib/logstash/inputs/azureblob.rb', line 17

def as_json(options={})
  {
    file_path: @file_path,
    etag: @etag,
    reader: @reader,
    offset: @offset,
    gen: @gen
  }
end

#to_json(*options) ⇒ Object

as_json



27
28
29
# File 'lib/logstash/inputs/azureblob.rb', line 27

def to_json(*options)
  as_json(*options).to_json(*options)
end