README.md in fluent-plugin-formatter-protobuf-0.0.5 vs README.md in fluent-plugin-formatter-protobuf-0.1.0

- old
+ new

@@ -16,11 +16,11 @@ ```shell $ gem install \ fluent-plugin-formatter-protobuf \ --version "<version>" \ - --source "https://rubygems.pkg.github.com/raytung" + --source "https://rubygems.pkg.github.com/fluent-plugins-nursery" ``` ### Bundler (RubyGems) Add following line to your Gemfile: @@ -30,26 +30,27 @@ ``` ### Bundler (GitHub RubyGems Registry), ```shell -source "https://rubygems.pkg.github.com/raytung" do +source "https://rubygems.pkg.github.com/fluent-plugins-nursery" do gem "fluent-plugin-formatter-protobuf", "<version>" end ``` And then execute: ``` $ bundle ``` -## Not so quick start +## Quick start 1. Generate the protobuf ruby methods 1. e.g `protoc --proto_path=. --ruby_out=. ./log.proto` -2. Modify the `<format>` section to include `message_name`, which is your Protobuf message name, and `include_paths`, the path where the generated Ruby types are stored +2. Modify the `<format>` section to include `class_name`, which is your Protobuf message name, and `include_paths`, the path where the generated Ruby types are stored + 1. Given protobuf class `Your::Protobuf::Class::Name` class should be given as `Your.Protobuf.Class.Name` in `class_name`. The exact name can be found in the generated Ruby files ## Example ```fluentd @@ -72,24 +73,21 @@ @type memory </buffer> <format> @type protobuf - message_name "Log" + class_name "Log" include_paths ["/opt/fluent-plugin-formatter-protobuf/log_pb.rb"] </format> </match> ``` ## Configuration -You can generate configuration template: - -``` -$ fluent-plugin-config-format formatter formatter-protobuf -``` - -You can copy and paste generated documents here. +|parameter|type|description|default| +|---|---|---|---| +|include_paths|array (optional)| Generated Ruby Protobuf class files path |`[]`| +|class_name|string (required)| Ruby Protobuf class name. Used to encode into Protobuf binary|| ## Copyright * Copyright(c) 2021 - Ray Tung * License