Commit Graph

6 Commits

Author SHA1 Message Date
Sven Anderson
6c944e8b65 rbd: make RBDError type unexported
In order to avoid external dependencies on implementation details,
this change replaces RBDError with the unexported rbdError. In case
some application really needs access to the integer value, it can use
the pattern
  var errno interface{ Errno() int }
  if errors.As(err, errno) { ... errno.Errno() ... }

Signed-off-by: Sven Anderson <sven@redhat.com>
2020-07-17 13:47:32 -04:00
root
e89344cae1 fix typos 2020-05-01 09:37:09 -04:00
John Mulligan
c2d0bc90ef rbd: add comments to features go file to pass check tool
Make the features.go file clean to the revive checker tool.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-03-23 10:09:25 -04:00
Niels de Vos
d6a88f65b7 rbd/features: add FeatureSet for mapping features between bits and names
Applications will mostly want to show names of features to their users,
and not just a few bits. With the FeatureSet functions it becomes simple
for applications to map the name of a feature to bits, and the other way
around

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-02-24 16:28:03 -05:00
Niels de Vos
6284986e01 rbd/features: add Image.UpdateFeatures()
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-02-24 16:28:03 -05:00
Niels de Vos
8b58ab92c4 rbd: move features to its own file
By splitting up the features from the main rbd.go file, it becomes
easier to support new features added by newer versions of Ceph.

This also drops the Rbd-prefix from the constants, and adds backwards
compatible references.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-02-24 16:28:03 -05:00