httpd: add an API to get data provider status

This commit is contained in:
Nicola Murino
2019-11-14 18:48:01 +01:00
parent f3de83707f
commit 206799ff1c
9 changed files with 111 additions and 3 deletions

View File

@@ -315,6 +315,11 @@ func GetUserByID(p Provider, ID int64) (User, error) {
return p.getUserByID(ID)
}
// GetProviderStatus returns an error if the provider is not available
func GetProviderStatus(p Provider) error {
return p.checkAvailability()
}
// Close releases all provider resources.
// This method is used in test cases.
// Closing an uninitialized provider is not supported