README: add requirement for build-tags when using non-current Ceph libraries

In order to selectively exclude/include certain .go files while building
and testing with the standard `go` tools, build-tags can be used.
Because go-ceph aims to support multiple Ceph versions, some functions
might not be available in the C libraries, or have been marked
deprecated in the header files. By selectively excluding/including some
of the .go files, warnings and errors can be prevented.

See-also: https://golang.org/pkg/go/build/#hdr-Build_Constraints
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-01-29 08:38:33 +01:00 committed by John Mulligan
parent c662d6fb2e
commit 7e3a5850f3
1 changed files with 12 additions and 0 deletions

View File

@ -18,6 +18,18 @@ On rpm based systems (dnf, yum, etc):
libcephfs-devel librbd-devel librados-devel
```
go-ceph tries to support different Ceph versions. However some functions might
only be available in recent versions, and others can be deprecated. In order to
work with non-current versions of Ceph, it is required to pass build-tags to on
the `go` commandline. A tag with the named Ceph release will enable/disable
certain features of the go-ceph packages, and prevent warnings or compile
problems. E.g. build against libcephfs/librados/librbd from Mimic, or run `go
test` against Limunous, use:
```sh
go build -tags mimic ....
go test -tags luminous ....
```
## Documentation
Detailed documentation is available at