mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
cleanup: don't return an internal type from VolumeGroupJournal.Connect()
The VolumeGroupJournal interface does not need to return anything except for a potential error. Any instance that implements the VolumeGroupJournal interface can be used to call all functions. Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
parent
9276aeb7fc
commit
32de26828f
@ -36,7 +36,7 @@ type VolumeGroupJournal interface {
|
||||
Connect(
|
||||
monitors,
|
||||
namespace string,
|
||||
cr *util.Credentials) (*volumeGroupJournalConfig, error)
|
||||
cr *util.Credentials) error
|
||||
// Destroy frees any resources and invalidates the journal connection.
|
||||
Destroy()
|
||||
// SetNamespace sets the namespace for the journal.
|
||||
@ -115,14 +115,14 @@ func (sgj *volumeGroupJournalConfig) Connect(
|
||||
monitors,
|
||||
namespace string,
|
||||
cr *util.Credentials,
|
||||
) (*volumeGroupJournalConfig, error) {
|
||||
) error {
|
||||
conn, err := sgj.Config.Connect(monitors, namespace, cr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return err
|
||||
}
|
||||
sgj.Connection = conn
|
||||
|
||||
return sgj, nil
|
||||
return nil
|
||||
}
|
||||
|
||||
func (sgj *volumeGroupJournalConfig) Destroy() {
|
||||
|
Loading…
Reference in New Issue
Block a user