Class: Conductor::Orkes::OrkesClients
- Inherits:
-
Object
- Object
- Conductor::Orkes::OrkesClients
- Defined in:
- lib/conductor/orkes/orkes_clients.rb
Overview
OrkesClients - Factory class that creates all high-level clients from a single configuration This is the primary entry point for Orkes Conductor users.
Usage:
config = Conductor::Configuration.new
config.server_url = 'https://developer.orkescloud.com/api'
config.authentication_settings = Conductor::Configuration::AuthenticationSettings.new(
key_id: 'your_key', key_secret: 'your_secret'
)
clients = Conductor::Orkes::OrkesClients.new(config)
workflow_client = clients.get_workflow_client
task_client = clients.get_task_client
secret_client = clients.get_secret_client
Instance Attribute Summary collapse
-
#api_client ⇒ Object
readonly
Returns the value of attribute api_client.
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
Instance Method Summary collapse
- #get_authorization_client ⇒ Object
- #get_integration_client ⇒ Object
- #get_metadata_client ⇒ Object
- #get_prompt_client ⇒ Object
- #get_scheduler_client ⇒ Object
- #get_schema_client ⇒ Object
- #get_secret_client ⇒ Object
- #get_task_client ⇒ Object
- #get_workflow_client ⇒ Object
- #get_workflow_executor ⇒ Object
-
#initialize(configuration = nil) ⇒ OrkesClients
constructor
A new instance of OrkesClients.
Constructor Details
#initialize(configuration = nil) ⇒ OrkesClients
Returns a new instance of OrkesClients.
23 24 25 26 |
# File 'lib/conductor/orkes/orkes_clients.rb', line 23 def initialize(configuration = nil) @configuration = configuration || Configuration.new @api_client = Http::ApiClient.new(configuration: @configuration) end |
Instance Attribute Details
#api_client ⇒ Object (readonly)
Returns the value of attribute api_client.
21 22 23 |
# File 'lib/conductor/orkes/orkes_clients.rb', line 21 def api_client @api_client end |
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
21 22 23 |
# File 'lib/conductor/orkes/orkes_clients.rb', line 21 def configuration @configuration end |
Instance Method Details
#get_authorization_client ⇒ Object
44 45 46 |
# File 'lib/conductor/orkes/orkes_clients.rb', line 44 def Client::AuthorizationClient.new(@api_client) end |
#get_integration_client ⇒ Object
52 53 54 |
# File 'lib/conductor/orkes/orkes_clients.rb', line 52 def get_integration_client Client::IntegrationClient.new(@api_client) end |
#get_metadata_client ⇒ Object
36 37 38 |
# File 'lib/conductor/orkes/orkes_clients.rb', line 36 def Client::MetadataClient.new(@configuration) end |
#get_prompt_client ⇒ Object
56 57 58 |
# File 'lib/conductor/orkes/orkes_clients.rb', line 56 def get_prompt_client Client::PromptClient.new(@api_client) end |
#get_scheduler_client ⇒ Object
40 41 42 |
# File 'lib/conductor/orkes/orkes_clients.rb', line 40 def get_scheduler_client Client::SchedulerClient.new(@configuration) end |
#get_schema_client ⇒ Object
60 61 62 |
# File 'lib/conductor/orkes/orkes_clients.rb', line 60 def get_schema_client Client::SchemaClient.new(@api_client) end |
#get_secret_client ⇒ Object
48 49 50 |
# File 'lib/conductor/orkes/orkes_clients.rb', line 48 def get_secret_client Client::SecretClient.new(@api_client) end |
#get_task_client ⇒ Object
32 33 34 |
# File 'lib/conductor/orkes/orkes_clients.rb', line 32 def get_task_client Client::TaskClient.new(@configuration) end |
#get_workflow_client ⇒ Object
28 29 30 |
# File 'lib/conductor/orkes/orkes_clients.rb', line 28 def get_workflow_client Client::WorkflowClient.new(@configuration) end |
#get_workflow_executor ⇒ Object
64 65 66 |
# File 'lib/conductor/orkes/orkes_clients.rb', line 64 def get_workflow_executor Workflow::WorkflowExecutor.new(@configuration) end |