Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 7781e3d

Browse files
authored
Merge pull request #11 from brycefranzen/add_connect_timeout
Add connect_timeout for guzzle
2 parents b685f07 + 8e3312e commit 7781e3d

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A minimal service provider to set up and use InfluxDB SDK in Laravel 5
66
```js
77
"require": {
88
// ...
9-
"pdffiller/laravel-influx-provider": "^1.2"
9+
"pdffiller/laravel-influx-provider": "^1.6"
1010
}
1111
```
1212
- Add these lines to `config/app.php`
@@ -33,6 +33,9 @@ LARAVEL_INFLUX_PROVIDER_PASSWORD=some_password
3333
LARAVEL_INFLUX_PROVIDER_HOST=host
3434
LARAVEL_INFLUX_PROVIDER_PORT=8086
3535
LARAVEL_INFLUX_PROVIDER_DATABASE=database_name
36+
LARAVEL_INFLUX_PROVIDER_VERIFY_SSL=false
37+
LARAVEL_INFLUX_PROVIDER_TIMEOUT=0
38+
LARAVEL_INFLUX_PROVIDER_CONNECT_TIMEOUT=0
3639
```
3740

3841
### How to use

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"php": ">=5.6",
1414
"illuminate/log": "5.2.*|5.3.*|5.4.*",
1515
"illuminate/support": "5.2.*|5.3.*|5.4.*",
16-
"influxdb/influxdb-php": "^1.4",
16+
"influxdb/influxdb-php": "1.14.*",
1717
"monolog/monolog": "^1.19"
1818
},
1919
"require-dev": {

src/InfluxDBServiceProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ public function register()
4848
config('influxdb.host'),
4949
config('influxdb.port'),
5050
'' //config('influxdb.database')
51-
), config('influxdb.timeout')
51+
),
52+
config('influxdb.timeout'),
53+
(config('influxdb.verify_ssl') === 'true'),
54+
config('influxdb.connect_timeout')
5255
);
5356
} catch (ClientException $e) {
5457
// die silently

src/config/InfluxDB.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,18 @@
3838
*/
3939
'log_message_lines_limit' => env('LARAVEL_INFLUX_PROVIDER_LOG_MESSAGE_LINES_LIMIT', 5),
4040

41+
/**
42+
* Verify SSL
43+
*/
44+
'verify_ssl' => env('LARAVEL_INFLUX_PROVIDER_VERIFY_SSL', 'false'),
45+
4146
/**
4247
* Timeout
4348
*/
4449
'timeout' => env('LARAVEL_INFLUX_PROVIDER_TIMEOUT', 0),
50+
51+
/**
52+
* Connect Timeout
53+
*/
54+
'connect_timeout' => env('LARAVEL_INFLUX_PROVIDER_CONNECT_TIMEOUT', 0),
4555
];

0 commit comments

Comments
 (0)