Class: Fluent::RdsMysqlSlowLog::Server
- Inherits:
-
Object
- Object
- Fluent::RdsMysqlSlowLog::Server
- Defined in:
- lib/fluent/plugin/in_rds_mysql_slow_log.rb
Instance Method Summary collapse
- #connect ⇒ Object
-
#initialize(host, port, username, password) ⇒ Server
constructor
A new instance of Server.
Constructor Details
#initialize(host, port, username, password) ⇒ Server
Returns a new instance of Server.
186 187 188 189 190 191 |
# File 'lib/fluent/plugin/in_rds_mysql_slow_log.rb', line 186 def initialize(host, port, username, password) @host = host @port = port @username = username @password = password end |
Instance Method Details
#connect ⇒ Object
193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/fluent/plugin/in_rds_mysql_slow_log.rb', line 193 def connect client = Mysql2::Client.new( host: @host, port: @port, username: @username, password: @password, database: 'mysql', cache_rows: false, cast: false ) yield client ensure client.close if client end |