Class: Datadog::Core::Remote::Configuration::Repository::State

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/core/remote/configuration/repository.rb

Overview

State store the repository state

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repository) ⇒ State

Returns a new instance of State.



77
78
79
80
81
82
83
84
85
86
# File 'lib/datadog/core/remote/configuration/repository.rb', line 77

def initialize(repository)
  @repository = repository
  @root_version = repository.root_version
  @targets_version = repository.targets_version
  @config_states = contents_to_config_states(repository.contents)
  @has_error = false
  @error = ''
  @opaque_backend_state = repository.opaque_backend_state
  @cached_target_files = contents_to_cached_target_files(repository.contents)
end

Instance Attribute Details

#cached_target_filesObject (readonly)

Returns the value of attribute cached_target_files.



68
69
70
# File 'lib/datadog/core/remote/configuration/repository.rb', line 68

def cached_target_files
  @cached_target_files
end

#config_statesObject (readonly)

Returns the value of attribute config_states.



68
69
70
# File 'lib/datadog/core/remote/configuration/repository.rb', line 68

def config_states
  @config_states
end

#errorObject (readonly)

Returns the value of attribute error.



68
69
70
# File 'lib/datadog/core/remote/configuration/repository.rb', line 68

def error
  @error
end

#has_errorObject (readonly)

Returns the value of attribute has_error.



68
69
70
# File 'lib/datadog/core/remote/configuration/repository.rb', line 68

def has_error
  @has_error
end

#opaque_backend_stateObject (readonly)

Returns the value of attribute opaque_backend_state.



68
69
70
# File 'lib/datadog/core/remote/configuration/repository.rb', line 68

def opaque_backend_state
  @opaque_backend_state
end

#root_versionObject (readonly)

Returns the value of attribute root_version.



68
69
70
# File 'lib/datadog/core/remote/configuration/repository.rb', line 68

def root_version
  @root_version
end

#targets_versionObject (readonly)

Returns the value of attribute targets_version.



68
69
70
# File 'lib/datadog/core/remote/configuration/repository.rb', line 68

def targets_version
  @targets_version
end