Class: Conductor::Orkes::OrkesClients

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_clientObject (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

#configurationObject (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_clientObject



44
45
46
# File 'lib/conductor/orkes/orkes_clients.rb', line 44

def get_authorization_client
  Client::AuthorizationClient.new(@api_client)
end

#get_integration_clientObject



52
53
54
# File 'lib/conductor/orkes/orkes_clients.rb', line 52

def get_integration_client
  Client::IntegrationClient.new(@api_client)
end

#get_metadata_clientObject



36
37
38
# File 'lib/conductor/orkes/orkes_clients.rb', line 36

def 
  Client::MetadataClient.new(@configuration)
end

#get_prompt_clientObject



56
57
58
# File 'lib/conductor/orkes/orkes_clients.rb', line 56

def get_prompt_client
  Client::PromptClient.new(@api_client)
end

#get_scheduler_clientObject



40
41
42
# File 'lib/conductor/orkes/orkes_clients.rb', line 40

def get_scheduler_client
  Client::SchedulerClient.new(@configuration)
end

#get_schema_clientObject



60
61
62
# File 'lib/conductor/orkes/orkes_clients.rb', line 60

def get_schema_client
  Client::SchemaClient.new(@api_client)
end

#get_secret_clientObject



48
49
50
# File 'lib/conductor/orkes/orkes_clients.rb', line 48

def get_secret_client
  Client::SecretClient.new(@api_client)
end

#get_task_clientObject



32
33
34
# File 'lib/conductor/orkes/orkes_clients.rb', line 32

def get_task_client
  Client::TaskClient.new(@configuration)
end

#get_workflow_clientObject



28
29
30
# File 'lib/conductor/orkes/orkes_clients.rb', line 28

def get_workflow_client
  Client::WorkflowClient.new(@configuration)
end

#get_workflow_executorObject



64
65
66
# File 'lib/conductor/orkes/orkes_clients.rb', line 64

def get_workflow_executor
  Workflow::WorkflowExecutor.new(@configuration)
end