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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14baf407b4e12fe8c70ccff75779949dd282e7eb
4
- data.tar.gz: 0561fd3a07931ab1cbd52e3bd9bfef3252297e66
3
+ metadata.gz: 720958ea0846b2464037f1be7168487b61451cdb
4
+ data.tar.gz: f6bcaea4ef5fdc1a343f22e748b5041e83a7f6a3
5
5
  SHA512:
6
- metadata.gz: 59dee73d5ec8b866756d8601635d66c5a5e36cccc7ce5439969b00f948c1d05f119f2c6c267ba6248cc595cd85d0dd916c09ef478371b2868287f014b32bbdd1
7
- data.tar.gz: ecac0abb4fee3769d555d4347c88d786148d1829bd528820111039c7076fe78547ad85a998f7d6a0040bcfcc2f547fa862f2e77335332f73a52a0f2530b2d0bd
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
- host localhost # localhost is default
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.3"
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 :host, :string, default: 'localhost'
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
- expires_on: @expires_in,
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("#{@host}:#{@port}", options)
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.3
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-21 00:00:00.000000000 Z
11
+ date: 2017-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler