zookeeper/get_string.go

21 lines
364 B
Go
Raw Normal View History

2021-08-09 03:12:08 +00:00
package zookeeper
2022-10-30 01:52:41 +00:00
import (
"git.selly.red/Selly-Modules/logger"
)
2021-08-09 03:12:08 +00:00
// GetStringValue ...
func GetStringValue(path string) string {
value, _, err := zkClient.Get(path)
if err != nil {
2022-10-30 01:52:41 +00:00
logger.Error("", logger.LogData{
Source: "zookeeper.GetStringValue",
Message: err.Error(),
Data: logger.Map{
"path": path,
},
})
2021-08-09 03:12:08 +00:00
}
return string(value)
}