Class: Fluent::Plugin::GrpcInput
- Inherits:
-
Input
- Object
- Input
- Fluent::Plugin::GrpcInput
- Defined in:
- lib/fluent/plugin/in_grpc.rb
Defined Under Namespace
Classes: ForwarderServer
Instance Method Summary collapse
Instance Method Details
#configure(conf) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/fluent/plugin/in_grpc.rb', line 24 def configure(conf) super if @port < 1024 raise Fluent::ConfigError, "well known ports cannot be used for this purpose." end end |
#shutdown ⇒ Object
45 46 47 48 49 |
# File 'lib/fluent/plugin/in_grpc.rb', line 45 def shutdown @s.stop super end |
#start ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/fluent/plugin/in_grpc.rb', line 33 def start super @s = GRPC::RpcServer.new @s.add_http2_port("#{@bind}:#{@port}", :this_port_is_insecure) @s.handle(ForwarderServer) thread_create :in_grpc_server do @s.run end end |