fluent-plugin-storage-memcached 0.0.3 → 0.1.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/README.md +1 -2
- data/fluent-plugin-storage-memcached.gemspec +1 -1
- data/lib/fluent/plugin/storage_memcached.rb +5 -4
- 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: 720958ea0846b2464037f1be7168487b61451cdb
|
4
|
+
data.tar.gz: f6bcaea4ef5fdc1a343f22e748b5041e83a7f6a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb9862e611f8a202469f165ce1d72bf08daf33ff5a2d262fc8e9b6dcfbe28f752bb1193e134236753af650b35becb2d681c28d7c1307cfabba0a7fc95a44cdc9
|
7
|
+
data.tar.gz: 9c43b621cd1666037110a99c663c1a79a3030137a2faaee5ce139475f696aaa77ff313e87f8ffc55685f29c2b3341e5c53ae240ea41a08528ec00fbac725fcb0
|
data/README.md
CHANGED
@@ -27,8 +27,7 @@ Or install it yourself as:
|
|
27
27
|
@type memcached
|
28
28
|
|
29
29
|
path my_key # or conf.arg will be used as memcached key
|
30
|
-
|
31
|
-
port 11211 # 11211 is default
|
30
|
+
hosts ['localhost:11211'] # ['localhost:11211'] is default
|
32
31
|
namespace app_v1 # app_v1 is default
|
33
32
|
compress true # true is default
|
34
33
|
# If sasl enabled memcached server is configured, please specify them.
|
@@ -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-memcached"
|
7
|
-
spec.version = "0.0
|
7
|
+
spec.version = "0.1.0"
|
8
8
|
spec.authors = ["Hiroshi Hatake"]
|
9
9
|
spec.email = ["cosmo0920.oucc@gmail.com"]
|
10
10
|
|
@@ -8,14 +8,14 @@ module Fluent
|
|
8
8
|
Fluent::Plugin.register_storage('memcached', self)
|
9
9
|
|
10
10
|
config_param :path, :string, default: nil
|
11
|
-
config_param :
|
12
|
-
config_param :port, :integer, default: 11211
|
11
|
+
config_param :hosts, :array, default: ['localhost:11211']
|
13
12
|
config_param :namespace, :string, default: 'app_v1'
|
14
13
|
config_param :compress, :bool, default: true
|
15
14
|
config_param :username, :string, default: nil
|
16
15
|
config_param :password, :string, default: nil, secret: true
|
17
16
|
config_param :serializer, :enum, list: [:yajl, :json, :marshal], default: :yajl
|
18
17
|
config_param :expires_in, :time, default: 0
|
18
|
+
config_param :failover, :bool, default: true
|
19
19
|
# Set persistent true by default
|
20
20
|
config_set_default :persistent, true
|
21
21
|
|
@@ -52,12 +52,13 @@ module Fluent
|
|
52
52
|
namespace: @namespace,
|
53
53
|
compress: @compress,
|
54
54
|
serializer: @serializer,
|
55
|
-
|
55
|
+
expires_in: @expires_in,
|
56
|
+
failover: @failover
|
56
57
|
}
|
57
58
|
options[:username] = @username if @username
|
58
59
|
options[:password] = @password if @password
|
59
60
|
|
60
|
-
@memcached = Dalli::Client.new(
|
61
|
+
@memcached = Dalli::Client.new(@hosts, options)
|
61
62
|
|
62
63
|
object = @memcached.get(@path)
|
63
64
|
if object
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-storage-memcached
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
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-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|