Class: Fluent::Plugin::OceanBaseLogsInput
- Inherits:
-
Input
- Object
- Input
- Fluent::Plugin::OceanBaseLogsInput
- Defined in:
- lib/fluent/plugin/in_oceanbase_logs.rb
Constant Summary collapse
- DEFAULT_STORAGE_TYPE =
'local'- LOG_TYPE_PATHS =
{ 'slow_sql' => 'slowSql', 'top_sql' => 'topSql', }.freeze
Instance Method Summary collapse
Instance Method Details
#configure(conf) ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/fluent/plugin/in_oceanbase_logs.rb', line 73 def configure(conf) super @endpoint = @endpoint.to_s.strip @endpoint = 'api-cloud-cn.oceanbase.com' if @endpoint.empty? @api_path_segment = LOG_TYPE_PATHS[@log_type.to_s] if @deduplicate @seen_storage = storage_create( usage: 'seen_traces', conf: config, default_type: DEFAULT_STORAGE_TYPE ) end end |
#shutdown ⇒ Object
93 94 95 96 |
# File 'lib/fluent/plugin/in_oceanbase_logs.rb', line 93 def shutdown @finished = true super end |
#start ⇒ Object
87 88 89 90 91 |
# File 'lib/fluent/plugin/in_oceanbase_logs.rb', line 87 def start super @finished = false thread_create(:in_oceanbase_logs_runner, &method(:run)) end |