ignite-client 0.1.1 → 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/CHANGELOG.md +8 -0
- data/README.md +7 -1
- data/lib/ignite/client.rb +7 -3
- data/lib/ignite/version.rb +1 -1
- data/lib/ignite.rb +8 -7
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0f2e2c94dd64afd629126983ad380351e4767942843a28c4a3f15af6bbc6755
|
4
|
+
data.tar.gz: 2de384d855a732143eac79d52185893348bc74a7821c82c9f9c3c65fcd63199c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e80c50e7d5867fad7c167d193026e94ffe6e5cf92e13b7f1e514982f77d63e70ed6db59b9188299a0f98ef7d95a3710dc7726e03065c8ab538b65e2517a77a9e
|
7
|
+
data.tar.gz: b3e604e8fa394dfac72ac040700afc97858d03d1b91faf3c9c6f5c7c620554efdc4d033a87dd80fb6ce9e6af84a86815b34d37a41a531c2a727b7b1c0ca40a46
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
Add this line to your application’s Gemfile:
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
gem
|
12
|
+
gem "ignite-client"
|
13
13
|
```
|
14
14
|
|
15
15
|
## Getting Started
|
@@ -95,6 +95,12 @@ Specify the host and port
|
|
95
95
|
Ignite::Client.new(host: "localhost", port: 10800)
|
96
96
|
```
|
97
97
|
|
98
|
+
Specify the connect timeout
|
99
|
+
|
100
|
+
```ruby
|
101
|
+
Ignite::Client.new(connect_timeout: 3)
|
102
|
+
```
|
103
|
+
|
98
104
|
## Authentication
|
99
105
|
|
100
106
|
For [authentication](https://ignite.apache.org/docs/latest/security/authentication), use:
|
data/lib/ignite/client.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
|
-
|
1
|
+
require_relative "../ignite"
|
2
2
|
|
3
3
|
module Ignite
|
4
4
|
class Client
|
5
|
-
def initialize(host: "localhost", port: 10800, username: nil, password: nil, use_ssl: nil, ssl_params: {})
|
6
|
-
|
5
|
+
def initialize(host: "localhost", port: 10800, username: nil, password: nil, use_ssl: nil, ssl_params: {}, connect_timeout: nil)
|
6
|
+
begin
|
7
|
+
@socket = Socket.tcp(host, port, connect_timeout: connect_timeout, resolv_timeout: connect_timeout)
|
8
|
+
rescue Errno::ETIMEDOUT
|
9
|
+
raise TimeoutError, "Connection timed out"
|
10
|
+
end
|
7
11
|
|
8
12
|
use_ssl = use_ssl.nil? ? (username || password) : use_ssl
|
9
13
|
if use_ssl
|
data/lib/ignite/version.rb
CHANGED
data/lib/ignite.rb
CHANGED
@@ -5,15 +5,16 @@ require "openssl"
|
|
5
5
|
require "socket"
|
6
6
|
|
7
7
|
# modules
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
require_relative "ignite/cache"
|
9
|
+
require_relative "ignite/op_codes"
|
10
|
+
require_relative "ignite/pack_formats"
|
11
|
+
require_relative "ignite/request"
|
12
|
+
require_relative "ignite/response"
|
13
|
+
require_relative "ignite/type_codes"
|
14
|
+
require_relative "ignite/version"
|
15
15
|
|
16
16
|
module Ignite
|
17
17
|
class Error < StandardError; end
|
18
18
|
class HandshakeError < Error; end
|
19
|
+
class TimeoutError < Error; end
|
19
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ignite-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: andrew@ankane.org
|
@@ -40,14 +40,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
43
|
+
version: '3'
|
44
44
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
requirements: []
|
50
|
-
rubygems_version: 3.
|
50
|
+
rubygems_version: 3.4.10
|
51
51
|
signing_key:
|
52
52
|
specification_version: 4
|
53
53
|
summary: Ruby client for Apache Ignite
|