Class: Mysql2::AwsRdsIam::AuthToken::Factory

Inherits:
Object
  • Object
show all
Defined in:
lib/mysql2/aws_rds_iam/auth_token/factory.rb

Constant Summary collapse

DEFAULT_GENERATOR =
:default

Class Method Summary collapse

Class Method Details

.call(generator, host, port, username) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/mysql2/aws_rds_iam/auth_token/factory.rb', line 9

def self.call(generator, host, port, username)
  AwsRdsIam.auth_token_registry.fetch(generator&.to_sym || DEFAULT_GENERATOR).call(
    host: host,
    port: port,
    username: username
  )
end