Class: AgentHarness::OrchestrationConfig
- Inherits:
-
Object
- Object
- AgentHarness::OrchestrationConfig
- Defined in:
- lib/agent_harness/configuration.rb
Overview
Orchestration configuration
Instance Attribute Summary collapse
-
#auto_switch_on_error ⇒ Object
Returns the value of attribute auto_switch_on_error.
-
#auto_switch_on_rate_limit ⇒ Object
Returns the value of attribute auto_switch_on_rate_limit.
-
#circuit_breaker_config ⇒ Object
readonly
Returns the value of attribute circuit_breaker_config.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#health_check_config ⇒ Object
readonly
Returns the value of attribute health_check_config.
-
#rate_limit_config ⇒ Object
readonly
Returns the value of attribute rate_limit_config.
-
#retry_config ⇒ Object
readonly
Returns the value of attribute retry_config.
Instance Method Summary collapse
-
#circuit_breaker {|CircuitBreakerConfig| ... } ⇒ CircuitBreakerConfig
Configure circuit breaker.
-
#health_check {|HealthCheckConfig| ... } ⇒ HealthCheckConfig
Configure health checking.
-
#initialize ⇒ OrchestrationConfig
constructor
A new instance of OrchestrationConfig.
-
#rate_limit {|RateLimitConfig| ... } ⇒ RateLimitConfig
Configure rate limiting.
-
#retry {|RetryConfig| ... } ⇒ RetryConfig
Configure retry behavior.
Constructor Details
#initialize ⇒ OrchestrationConfig
Returns a new instance of OrchestrationConfig.
139 140 141 142 143 144 145 146 147 |
# File 'lib/agent_harness/configuration.rb', line 139 def initialize @enabled = true @auto_switch_on_error = true @auto_switch_on_rate_limit = true @circuit_breaker_config = CircuitBreakerConfig.new @retry_config = RetryConfig.new @rate_limit_config = RateLimitConfig.new @health_check_config = HealthCheckConfig.new end |
Instance Attribute Details
#auto_switch_on_error ⇒ Object
Returns the value of attribute auto_switch_on_error.
135 136 137 |
# File 'lib/agent_harness/configuration.rb', line 135 def auto_switch_on_error @auto_switch_on_error end |
#auto_switch_on_rate_limit ⇒ Object
Returns the value of attribute auto_switch_on_rate_limit.
135 136 137 |
# File 'lib/agent_harness/configuration.rb', line 135 def auto_switch_on_rate_limit @auto_switch_on_rate_limit end |
#circuit_breaker_config ⇒ Object (readonly)
Returns the value of attribute circuit_breaker_config.
137 138 139 |
# File 'lib/agent_harness/configuration.rb', line 137 def circuit_breaker_config @circuit_breaker_config end |
#enabled ⇒ Object
Returns the value of attribute enabled.
135 136 137 |
# File 'lib/agent_harness/configuration.rb', line 135 def enabled @enabled end |
#health_check_config ⇒ Object (readonly)
Returns the value of attribute health_check_config.
137 138 139 |
# File 'lib/agent_harness/configuration.rb', line 137 def health_check_config @health_check_config end |
#rate_limit_config ⇒ Object (readonly)
Returns the value of attribute rate_limit_config.
137 138 139 |
# File 'lib/agent_harness/configuration.rb', line 137 def rate_limit_config @rate_limit_config end |
#retry_config ⇒ Object (readonly)
Returns the value of attribute retry_config.
137 138 139 |
# File 'lib/agent_harness/configuration.rb', line 137 def retry_config @retry_config end |
Instance Method Details
#circuit_breaker {|CircuitBreakerConfig| ... } ⇒ CircuitBreakerConfig
Configure circuit breaker
153 154 155 156 |
# File 'lib/agent_harness/configuration.rb', line 153 def circuit_breaker(&block) yield(@circuit_breaker_config) if block_given? @circuit_breaker_config end |
#health_check {|HealthCheckConfig| ... } ⇒ HealthCheckConfig
Configure health checking
180 181 182 183 |
# File 'lib/agent_harness/configuration.rb', line 180 def health_check(&block) yield(@health_check_config) if block_given? @health_check_config end |
#rate_limit {|RateLimitConfig| ... } ⇒ RateLimitConfig
Configure rate limiting
171 172 173 174 |
# File 'lib/agent_harness/configuration.rb', line 171 def rate_limit(&block) yield(@rate_limit_config) if block_given? @rate_limit_config end |
#retry {|RetryConfig| ... } ⇒ RetryConfig
Configure retry behavior
162 163 164 165 |
# File 'lib/agent_harness/configuration.rb', line 162 def retry(&block) yield(@retry_config) if block_given? @retry_config end |