class Fluent::RdsMysqlSlowLog::Server

Public Class Methods

new(host, port, username, password) click to toggle source
# 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

Public Instance Methods

connect() { |client| ... } click to toggle source
# 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