rbd: improve the description for GetID() and GetName() interfaces

The `GetID()` and `GetName()` functions can be confusing, as names and
ID's are not always distinctive enough. The name is used to reference an
object that exists in a pool. The ID the CSI-handle formatted and can be
used to locate the entry for the object in the journal.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos 2025-03-25 09:28:19 +01:00 committed by mergify[bot]
parent 63df17171a
commit 3f33e87e70

View File

@ -26,10 +26,15 @@ import (
)
type journalledObject interface {
// GetID returns the ID in the backend storage for the object.
// GetID returns the CSI-handle formatted ID of the object. The handle
// can be parsed to locate an entry in the journal, which points to the
// object in the backend storage (see `GetClusterID`, `GetPool`, and
// `GetName`).
GetID(ctx context.Context) (string, error)
// GetName returns the name of the object in the backend storage.
// GetName returns the name in the backend storage for the object. The
// name is used for accessing the object though the Ceph APIs.
// RBD-images and RBD-groups exist in the backend with the given name.
GetName(ctx context.Context) (string, error)
// GetPool returns the name of the pool that holds the object.