Plugin Helper: Server
require 'fluent/plugin/input'
module Fluent::Plugin
class ExampleInput < Input
Fluent::Plugin.register_input('example', self)
# 1. Load server helper
helpers :server
# Omit `configure`, `shutdown` and other plugin APIs
def start
# 2. Create server
server_create(:title, @port) do |data|
#3. Process data
end
end
end
endMethods
server_create_connection(title, port, proto: nil, bind: '0.0.0.0', shared: true, backlog: nil, tls_options: nil, **socket_options, &block)
server_create_connection(title, port, proto: nil, bind: '0.0.0.0', shared: true, backlog: nil, tls_options: nil, **socket_options, &block)server_create(title, port, proto: nil, bind: '0.0.0.0', shared: true, socket: nil, backlog: nil, tls_options: nil, max_bytes: nil, flags: 0, **socket_options, &callback)
server_create(title, port, proto: nil, bind: '0.0.0.0', shared: true, socket: nil, backlog: nil, tls_options: nil, max_bytes: nil, flags: 0, **socket_options, &callback)Configuration example
General configuration
linger_timeout
linger_timeouttype
default
available transport type
version
TLS configuration: Basic examples
TLS configuration: cert_verifier example
cert_verifier exampleProc or lambda Object for the Simple Scenario
Proc or lambda Object for the Simple ScenarioUse class for the Complicated Scenario
class for the Complicated ScenarioPlugins using server
serverLast updated
Was this helpful?