fluent-plugin-storage-mongo 0.0.1 → 0.0.2
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/README.md +9 -10
- data/fluent-plugin-storage-mongo.gemspec +1 -1
- data/lib/fluent/plugin/storage_mongo.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '0820d51e381332916791bb09a0ec68de66c12b7e'
|
|
4
|
+
data.tar.gz: 53bd8cfc573fbdec11d27a324693b2aea144d53e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f57e509e0558c7bcded908dd3b0763c5172b6eb4cd67f1bf079a8a0a47e3eaa36272e79cb734e1012bd1fd79edab93c5951110453917e6e961ac1b63dcc794d2
|
|
7
|
+
data.tar.gz: 4efd90933307203bdbc86696ae6ad15e81fb1ed564957665cdf78edda57f16cac995d5955ee40e8075dc107f89d7b9de6fc0afeec0355d2394b28e79c2287a2b
|
data/README.md
CHANGED
|
@@ -26,10 +26,10 @@ Or install it yourself as:
|
|
|
26
26
|
|
|
27
27
|
## Configuration
|
|
28
28
|
|
|
29
|
-
Use _mongo_ type in
|
|
29
|
+
Use _mongo_ type in storage.
|
|
30
30
|
|
|
31
31
|
```aconf
|
|
32
|
-
<
|
|
32
|
+
<storage>
|
|
33
33
|
@type mongo
|
|
34
34
|
database fluent
|
|
35
35
|
collection test
|
|
@@ -38,27 +38,26 @@ Use _mongo_ type in store.
|
|
|
38
38
|
host fluenter
|
|
39
39
|
port 10000
|
|
40
40
|
|
|
41
|
-
# capped
|
|
41
|
+
# Set 'capped true' if you want to use capped collection
|
|
42
|
+
capped true
|
|
43
|
+
capped_size 100m
|
|
42
44
|
|
|
43
45
|
# Set 'user' and 'password' for authentication
|
|
44
|
-
user
|
|
45
|
-
password
|
|
46
|
-
|
|
47
|
-
# Other buffer configurations here
|
|
48
|
-
</store>
|
|
46
|
+
user mongo
|
|
47
|
+
password passw0rd
|
|
48
|
+
</storage>
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
## Development
|
|
52
52
|
|
|
53
53
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
54
54
|
|
|
55
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `
|
|
55
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `fluent-plugin-storage-mongo.gemspec`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
56
56
|
|
|
57
57
|
## Contributing
|
|
58
58
|
|
|
59
59
|
Bug reports and pull requests are welcome on GitHub at https://github.com/cosmo0920/fluent-plugin-storage-mongo.
|
|
60
60
|
|
|
61
|
-
|
|
62
61
|
## License
|
|
63
62
|
|
|
64
63
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = "fluent-plugin-storage-mongo"
|
|
7
|
-
spec.version = "0.0.
|
|
7
|
+
spec.version = "0.0.2"
|
|
8
8
|
spec.authors = ["Hiroshi Hatake"]
|
|
9
9
|
spec.email = ["cosmo0920.oucc@gmail.com"]
|
|
10
10
|
|
|
@@ -61,6 +61,13 @@ module Fluent
|
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
+
if conf.has_key?('capped') and Fluent::Config.bool_value(conf['capped'])
|
|
65
|
+
raise Fluent::ConfigError, "'capped_size' parameter is required on <storage> of Mongo storage" unless conf.has_key?('capped_size')
|
|
66
|
+
@collection_options[:capped] = true
|
|
67
|
+
@collection_options[:size] = Fluent::Config.size_value(conf['capped_size'])
|
|
68
|
+
@collection_options[:max] = Fluent::Config.size_value(conf['capped_max']) if conf.has_key?('capped_max')
|
|
69
|
+
end
|
|
70
|
+
|
|
64
71
|
@client_options[:write] = {j: @journaled}
|
|
65
72
|
@client_options[:write].merge!({w: @write_concern}) unless @write_concern.nil?
|
|
66
73
|
@client_options[:ssl] = @ssl
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-storage-mongo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hiroshi Hatake
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-02-
|
|
11
|
+
date: 2017-02-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|