feat: add close method for Cassandra (#2961)
Signed-off-by: Alexandre Liberato <alexandreliberato@mailfence.com> Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com> Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
This commit is contained in:
parent
5adc33d079
commit
c62e7c9ad7
|
@ -326,3 +326,14 @@ func (c *Cassandra) GetComponentMetadata() map[string]string {
|
|||
metadata.GetMetadataInfoFromStructType(reflect.TypeOf(metadataStruct), &metadataInfo, metadata.StateStoreType)
|
||||
return metadataInfo
|
||||
}
|
||||
|
||||
// Close the connection to Cassandra.
|
||||
func (c *Cassandra) Close() error {
|
||||
if c.session == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
c.session.Close()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue