John Mulligan
e07f6a6050
rados: replace Println calls with a proper error
...
Replace the odd calls to Println with a comparable error value.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2019-12-13 15:17:27 +01:00
John Mulligan
5ea85a9419
Merge pull request #89 from CodeLingoBot/rewrite
...
Fix function comments based on best practices from Effective Go
2019-12-11 19:56:20 -05:00
Niels de Vos
09b6977dc9
rados: free cluster runtime resources automatically
...
Release resources that are allocated while configuring the connection to
the cluster. rados_shutdown() should only be needed after a successful
call to rados_connect(), however if the connection has been configured
with non-default parameters, some of the parameters may be allocated
before connecting. rados_shutdown() will free the allocated resources,
even if there has not been a connection yet.
Note that the finalizers get executed during garbage collection, which
can be forced by calling runtime.GC() for testing.
Fixes : #109
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2019-11-26 09:59:19 -05:00
Niels de Vos
43a863d1cb
Add GetPoolByID() for calling rados_pool_reverse_lookup()
...
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2019-11-01 14:40:47 -04:00
Niels de Vos
bcf44fc782
Add GetPoolByName() for calling rados_pool_lookup()
...
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2019-11-01 14:40:47 -04:00
CodeLingo Bot
9e2fbe369f
Fix function comments based on best practices from Effective Go
...
Signed-off-by: CodeLingo Bot <bot@codelingo.io>
2019-03-06 03:14:57 +00:00
Dario Maiocchi
caf0f7ed68
Use Guardclause for function
2018-10-09 10:22:02 +02:00
Noah Watkins
6363bf77ae
rados: use test suite to share code
...
Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-08-07 18:48:17 -07:00
Noah Watkins
c14a3857fa
rados: add a connected flag to the conn obj
...
Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-07-28 14:23:18 -07:00
Jared Watts
c08104a20f
Add support for mon_command input buffer
2016-07-21 13:07:30 -07:00
Livio Soares
6f8cc46f47
rados/conn: Fix passing of Go allocated pointer to CGO function in MonCommand(), which panics Go 1.6.
...
Addresses issue #10 .
2016-03-24 22:13:09 -04:00
Kai Storbeck
0c6bdf8d59
run gofmt on all sources
2015-02-11 22:21:05 +01:00
Kai Storbeck
563c4eb06d
add some comments, drop reflect version
2015-02-11 20:13:35 +01:00
Kai Storbeck
1e0ea49819
Return a []byte pointing to the original C array
...
This was taken from an example on Go's own wiki (cgo page).
2015-02-11 19:56:41 +01:00
Kai Storbeck
ca76480b0b
implemment MonCommand
2015-02-10 22:11:37 +01:00
Kai Storbeck
a06dd37546
implement the MonCommand function
2015-02-10 21:13:56 +01:00
Noah Watkins
253495ee26
rados: move rados to its own package
...
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2015-01-12 20:54:02 -08:00