Class: LogStash::Inputs::RegistryItem

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

Overview

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



28
29
30
31
32
33
34
# File 'lib/logstash/inputs/azureblob.rb', line 28

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.



12
13
14
# File 'lib/logstash/inputs/azureblob.rb', line 12

def etag
  @etag
end

#file_pathObject

Returns the value of attribute file_path.



12
13
14
# File 'lib/logstash/inputs/azureblob.rb', line 12

def file_path
  @file_path
end

#genObject

Returns the value of attribute gen.



12
13
14
# File 'lib/logstash/inputs/azureblob.rb', line 12

def gen
  @gen
end

#offsetObject

Returns the value of attribute offset.



12
13
14
# File 'lib/logstash/inputs/azureblob.rb', line 12

def offset
  @offset
end

#readerObject

Returns the value of attribute reader.



12
13
14
# File 'lib/logstash/inputs/azureblob.rb', line 12

def reader
  @reader
end

Instance Method Details

#as_json(options = {}) ⇒ Object

Allow json serialization.



14
15
16
17
18
19
20
21
22
# File 'lib/logstash/inputs/azureblob.rb', line 14

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

#to_json(*options) ⇒ Object

as_json



24
25
26
# File 'lib/logstash/inputs/azureblob.rb', line 24

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