fluent-plugin-config-expander 0.1.5 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +6 -1
- data/README.md +9 -9
- data/fluent-plugin-config-expander.gemspec +3 -2
- data/lib/fluent/plugin/in_config_expander.rb +2 -1
- data/lib/fluent/plugin/out_config_expander.rb +2 -1
- metadata +19 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ad6529782532130678cbbd6bc03aa335e8564f9
|
4
|
+
data.tar.gz: a639204ce86d477002d5f126fc721e3a12e1a27f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e174212a0444eae13a6c3d737f9afb3cb4eaa2ee05642f433ffc00c3d60f188a2c59668a03e4750543d1f0e7aa408655cb8e1265148aaea828c8f3f52680718b
|
7
|
+
data.tar.gz: 116d14ebd7709762c41853d8f76d56a3f2cb3d3daddddae7ef2946eb9fed885d725c585748a3c331b726e6dad5d56229e9025f28229086edaaa82dd8c7f4ea2d
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -15,9 +15,9 @@ And also supports built-in placeholders below:
|
|
15
15
|
For both of input and output (for <source> and <match>), you can use 'config_expander' and its 'for' directive like below:
|
16
16
|
|
17
17
|
<match example.**>
|
18
|
-
type config_expander
|
18
|
+
@type config_expander
|
19
19
|
<config>
|
20
|
-
type forward
|
20
|
+
@type forward
|
21
21
|
flush_interval 30s
|
22
22
|
<for x in 01 02 03>
|
23
23
|
<server>
|
@@ -31,7 +31,7 @@ For both of input and output (for <source> and <match>), you can use 'config_exp
|
|
31
31
|
Configuration above is equal to below:
|
32
32
|
|
33
33
|
<match example.**>
|
34
|
-
type forward
|
34
|
+
@type forward
|
35
35
|
flush_interval 30s
|
36
36
|
<server>
|
37
37
|
host worker01.local
|
@@ -50,9 +50,9 @@ Configuration above is equal to below:
|
|
50
50
|
As placeholder, you can use '${varname}' style:
|
51
51
|
|
52
52
|
<match example.**>
|
53
|
-
type config_expander
|
53
|
+
@type config_expander
|
54
54
|
<config>
|
55
|
-
type forward
|
55
|
+
@type forward
|
56
56
|
flush_interval 30s
|
57
57
|
<for node in 01 02 03>
|
58
58
|
<server>
|
@@ -66,9 +66,9 @@ As placeholder, you can use '${varname}' style:
|
|
66
66
|
Nested 'for' directive is valid:
|
67
67
|
|
68
68
|
<match example.**>
|
69
|
-
type config_expander
|
69
|
+
@type config_expander
|
70
70
|
<config>
|
71
|
-
type forward
|
71
|
+
@type forward
|
72
72
|
flush_interval 30s
|
73
73
|
<for x in 01 02 03>
|
74
74
|
<for p in 24221 24222 24223 24224
|
@@ -84,9 +84,9 @@ Nested 'for' directive is valid:
|
|
84
84
|
Set hostname into tag in 'tail' input plugin:
|
85
85
|
|
86
86
|
<source>
|
87
|
-
type config_expander
|
87
|
+
@type config_expander
|
88
88
|
<config>
|
89
|
-
type tail
|
89
|
+
@type tail
|
90
90
|
format /..../
|
91
91
|
path /var/log/access.log
|
92
92
|
tag access.log.${hostname}
|
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = "fluent-plugin-config-expander"
|
5
|
-
gem.version = "0.
|
5
|
+
gem.version = "0.2.0"
|
6
6
|
gem.authors = ["TAGOMORI Satoshi"]
|
7
7
|
gem.email = ["tagomoris@gmail.com"]
|
8
8
|
gem.description = %q{This plugin provides directives for loop extraction}
|
9
9
|
gem.summary = %q{Fluentd plugin to serve some DSL directives in configuration}
|
10
10
|
gem.homepage = "https://github.com/tagomoris/fluent-plugin-config-expander"
|
11
|
-
gem.license = "
|
11
|
+
gem.license = "Apache-2.0"
|
12
12
|
|
13
13
|
gem.files = `git ls-files`.split($\)
|
14
14
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
@@ -16,5 +16,6 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.require_paths = ["lib"]
|
17
17
|
|
18
18
|
gem.add_development_dependency "rake"
|
19
|
+
gem.add_development_dependency "test-unit", "~> 3.1.7"
|
19
20
|
gem.add_runtime_dependency "fluentd"
|
20
21
|
end
|
@@ -35,7 +35,8 @@ class Fluent::ConfigExpanderInput < Fluent::Input
|
|
35
35
|
raise Fluent::ConfigError, "config_expander needs just one <config> ... </config> section"
|
36
36
|
end
|
37
37
|
ex = expand_config(configs.first)
|
38
|
-
|
38
|
+
type = ex['@type'] || ex['type']
|
39
|
+
@plugin = Fluent::Plugin.new_input(type)
|
39
40
|
@plugin.configure(ex)
|
40
41
|
|
41
42
|
mark_used(configs.first)
|
@@ -37,7 +37,8 @@ class Fluent::ConfigExpanderOutput < Fluent::MultiOutput
|
|
37
37
|
raise Fluent::ConfigError, "config_expander needs just one <config> ... </config> section"
|
38
38
|
end
|
39
39
|
ex = expand_config(configs.first)
|
40
|
-
|
40
|
+
type = ex['@type'] || ex['type']
|
41
|
+
@plugin = Fluent::Plugin.new_output(type)
|
41
42
|
@plugin.configure(ex)
|
42
43
|
|
43
44
|
@outputs = [@plugin]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-config-expander
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TAGOMORI Satoshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: test-unit
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.1.7
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 3.1.7
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: fluentd
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -62,7 +76,7 @@ files:
|
|
62
76
|
- test/plugins.rb
|
63
77
|
homepage: https://github.com/tagomoris/fluent-plugin-config-expander
|
64
78
|
licenses:
|
65
|
-
-
|
79
|
+
- Apache-2.0
|
66
80
|
metadata: {}
|
67
81
|
post_install_message:
|
68
82
|
rdoc_options: []
|
@@ -80,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
94
|
version: '0'
|
81
95
|
requirements: []
|
82
96
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.
|
97
|
+
rubygems_version: 2.5.1
|
84
98
|
signing_key:
|
85
99
|
specification_version: 4
|
86
100
|
summary: Fluentd plugin to serve some DSL directives in configuration
|
@@ -90,3 +104,4 @@ test_files:
|
|
90
104
|
- test/plugin/test_in_config_expander.rb
|
91
105
|
- test/plugin/test_out_config_expander.rb
|
92
106
|
- test/plugins.rb
|
107
|
+
has_rdoc:
|