Commit Graph

248 Commits (fb3c837de988c67116bac90c96ed3fb20d5a0849)

Author SHA1 Message Date
Jonathan A. Sternberg b3d42983b6
Merge pull request #10437 from seebs/seebs/errors
Don't use fmt.Errorf on random strings
2018-11-05 11:39:54 -06:00
Seebs acdb9a6271 Don't use fmt.Errorf on random strings
In a few places, the client was assuming that an error
string would necessarily be safe to pass as a format string.
This seems unwise.
2018-10-30 19:05:37 -05:00
miya-masa c19788030d
Add the `QueryAsChunk` method to v2 client 2018-10-30 09:06:16 -05:00
Jonathan A. Sternberg 857afc1006
Merge pull request #10125 from sangyun-han/master
update UDP client example
2018-10-01 16:16:06 -05:00
Sangyun Han fcb20c2c95
update UDP client example
- fix NewUDPClient to use UDPConfig
2018-10-01 16:14:24 -05:00
Jeff Wendling 767b991089 implement using tls configuration 2018-08-02 14:29:07 -06:00
Jonathan A. Sternberg 08e40b0db0
Merge pull request #9753 from influxdata/js-client-rp-parameter
Add retention policy query parameter to queries
2018-05-04 16:24:20 -05:00
Edd Robinson a446134d6f
Merge pull request #8034 from dsouzae/br_validate_points
Validate points on input
2018-04-26 10:42:12 +01:00
Jonathan A. Sternberg 373506e335 Add retention policy query parameter to queries 2018-04-24 11:21:12 -05:00
Jan Garaj fd3156e4c1 Update client README - close client resources 2018-04-16 18:45:58 +01:00
Jonathan A. Sternberg c67a0548a0 Support proxy environment variables in the influx client
This also adds support for both the v1 and v2 APIs to set the Proxy
function on the underlying http.Transport.

The functionality for proxy environment variables is provided by the
[http.ProxyFromEnvironment](https://godoc.org/net/http#ProxyFromEnvironment).
2018-02-11 21:51:58 -06:00
Jonathan A. Sternberg c6d01e3fcf
Merge pull request #9403 from influxdata/js-9259-influx-cli-port-fix
Do not explicitly specify ports 80 or 443 when they are the default port
2018-02-08 12:47:22 -06:00
Jonathan A. Sternberg fab5c70f6d Do not explicitly specify ports 80 or 443 when they are the default port
The default port for HTTP is 80 and HTTPS is 443. When you host InfluxDB
on a service that uses a reverse proxy, the `Host` header needs to be
exactly correct. Since the host header isn't expecting to see the port
when it is the default, this causes routing to fail.
2018-02-08 10:25:04 -06:00
Jonathan A. Sternberg ba76535b35
Merge pull request #9232 from genofire/fix-client-url
[BUGFIX] client url path
2018-02-07 14:04:39 -06:00
Martin Geno 6cbbd2be2d
[BUGFIX] client url path 2018-02-07 17:47:18 +01:00
Edd Robinson 8a00870616
Merge pull request #9296 from simon04/patch-1
Fix typos in variable name, comment
2018-01-29 04:44:32 -08:00
Edd Robinson 67d1fa3972 Cleanup remaining packages 2018-01-21 12:08:25 -08:00
Simon Legner a1a43d3b69
Fix typos in variable name, comment 2018-01-10 00:20:49 +01:00
Jonathan A. Sternberg af23897940 Allow setting the node id in the influx cli program
The string `node <n>` can be used to specify which data node the data
should be retrieved from. This uses the `node_id=X` query parameter that
is supported, but wasn't exposed anywhere in the client library.

We use this feature enough internally when attempting to find
inconsistencies or network errors that it is easier if this is just
supported. Otherwise, I continue having to recompile the CLI program
every time I need to do this.

To clear a previously set node, you can use `node 0` or `node clear`.
2018-01-02 11:15:19 -06:00
Stuart Carnie 4f0c70591b Go 1.10 omits Content-Type if server response has no body
https://tip.golang.org/doc/go1.10#net/http

> The content-serving handlers also now omit the Content-Type header
when serving zero-length content.
2017-12-07 19:18:44 -07:00
Andrew Montgomery-Hurrell 2ed0d2d1c9
Make client errors more helpful on downstream errs
When a downstream server such as a proxy or loadbalancer between
influxdb and the client produces an error, the client currently does
not make this very obvious.

This change introduces checks on both the content type and the
influx version header to identify whether a request was served by
influxdb itself and returns a more appropriate error in the cases
where it can be determined a downstream issue is at play.
2017-10-26 11:56:29 +01:00
Jonathan A. Sternberg 2f47c3d28f Add support for uint64 in the clients 2017-10-05 09:35:06 -05:00
emluque fa681edcb9 6563 Support Ctrl+C to cancel a running query in the Influx CLI
Solved the issue by using context on the http request on the client.
2017-09-01 08:02:27 -05:00
Jason Wilder 2c33919f9c Add build for go 1.9 2017-07-21 12:37:52 -06:00
Jonathan A. Sternberg 206fff70c6 Correct the client package README
Fixes #8563.
2017-07-20 14:56:04 -05:00
Jason Wilder 2cac46ebbc Convert usage of strings to []byte
Measurement name and field were converted between []byte and string
repetively causing lots of garbage.  This switches the code to use
[]byte in the write path.
2017-05-12 14:05:19 -06:00
Ellery D'Souza 7ebb3f2c6a Make sure that there is no nil points 2017-02-20 12:43:16 -05:00
jgeiger 43117a94d6 Add chunked processing back into v2 client
- Moving the to v2 client removed this functionality. This copies
  code back into the client. The tests were also added back into
  the test suite.
2017-02-13 09:21:13 -07:00
Edd Robinson 91ee34b111 Merge pull request #7837 from influxdata/er-tidy
General tidy up and subtle bug fixes
2017-01-26 13:43:07 +00:00
Mehmet Cetin 2079eae951 fixes rand.Seed placement 2017-01-24 00:57:03 +03:00
Mehmet Cetin 9def65af1b changes log.Fatalln to log.Fatal move random seed inside for loop to make it random 2017-01-23 19:13:05 +03:00
M. Cetin 4d4207be7f Updating Readme to make writePoints function work
Hello,

I have tried this example as it is for now. Encountered an error that AddPoint function expects only one argument. Checked you GoDoc and updated the example in your error handling style. It works like this.
2017-01-23 17:09:01 +03:00
Edd Robinson feb7a2842c Use unbuffered error channels in tests 2017-01-17 10:53:15 -08:00
Edd Robinson fb7388cdfc Remove dead code from various pkgs 2017-01-17 09:47:34 -08:00
Mark Rushakoff 6a94d200c8 Merge remote-tracking branch 'influx/master' into mr-godoc 2017-01-04 13:27:36 -08:00
Cory LaNou 3c518f8927
panicing is bad -> error returns are good 2017-01-03 14:28:29 -06:00
Mark Rushakoff 623bb71b01 Update godoc for the client packages 2016-12-30 11:58:43 -08:00
Harry Rose a07103ca72 Add bound parameters map to Query object. Fixes #7687 2016-12-20 20:07:28 +00:00
Edd Robinson a98ad483ee Refactor how CLI manages configuration options 2016-12-02 18:26:47 +00:00
DanKans e0291e419b Update Client documentation
* Added additional variable to fulfil NewUDPClient function requirement (there was one instead of 2) and it caused multiple-value client.NewUDPClient() in single-value context error

* Update README.md

Added error handling.
2016-12-01 18:18:28 +00:00
oiooj 8ddb11cee2 support unix socket connect for influx CLI 2016-11-30 22:37:56 +08:00
Jonathan A. Sternberg 3afdf3cd94 Merge tag 'v1.0.1' 2016-09-27 17:53:33 -05:00
Joe LeGasse 2cbd411a9a client: updated README for UDP point splitting 2016-09-23 15:13:40 -04:00
Joe LeGasse 0d2b339d7c models: Added AppendString, PointSize, and Round to Point
This change also updates the UDP client to take advantage of these
improvements, as well as some code review changes.
2016-09-23 13:22:30 -04:00
Joe LeGasse ee6816756a udp client: large points will now be split, if possible
The v2 UDP client will attempt to split points that exceed the
configured payload size. It will only do this for points that have a
timestamp specified.
2016-09-23 13:22:30 -04:00
Vladimir Sagan 86f3300a46 refactor conditions of udp write func 2016-09-23 13:22:30 -04:00
Vladimir Sagan a3da819552 UDP client refactoring 2016-09-23 13:22:30 -04:00
Vladimir Sagan 0e33af50a9 UDP client: write metrics splitting metrics into chunks 2016-09-23 13:22:30 -04:00
Jonathan A. Sternberg 954445efd2 Read an invalid JSON response as an error in the influx client 2016-09-13 15:39:26 -05:00
Ben Johnson 8aa224b22d
reduce memory allocations in index
This commit changes the index to point to index data in the shards
instead of keeping it in-memory on the heap.
2016-08-16 14:09:00 -06:00