new oclib match

This commit is contained in:
mr
2026-02-12 13:39:52 +01:00
parent 7e8546bbea
commit 403913d8cf
4 changed files with 7 additions and 7 deletions

View File

@@ -157,7 +157,7 @@ func (a *API) CheckRemoteAPIs(apis []DataType) (State, map[string]string, error)
reachable := false
for _, api := range apis { // Check the state of each remote API in the list
var resp APIStatusResponse
b, err := caller.CallGet("http://"+api.API()+":8080", "/oc/version/status") // Call the status endpoint of the remote API (standard OC status endpoint)
b, err := caller.CallGet("http://"+api.InnerAPI()+":8080", "/oc/version/status") // Call the status endpoint of the remote API (standard OC status endpoint)
if err != nil {
l.Error().Msg(api.String() + " not reachable")
state = REDUCED_SERVICE // If a remote API is not reachable, return reduced service

View File

@@ -84,7 +84,7 @@ var MINIO = func() string {
}
// Bind the standard API name to the data type
var DefaultAPI = [...]func() string{
var InnerDefaultAPI = [...]func() string{
NOAPI,
CATALOGAPI,
CATALOGAPI,
@@ -151,8 +151,8 @@ func FromInt(i int) string {
return Str[i]
}
func (d DataType) API() string { // API - Returns the API name of the data type
return DefaultAPI[d]()
func (d DataType) InnerAPI() string { // API - Returns the API name of the data type
return InnerDefaultAPI[d]()
}
func (d DataType) String() string { // String - Returns the string name of the data type