b9a85fb4f2c3e725a94132093670b65c992db227.svn-base 373 B

123456789101112131415161718192021
  1. package service
  2. type Service interface {
  3. // HealthCheck check service health status
  4. HealthCheck() bool
  5. }
  6. type CommonService struct {
  7. }
  8. // HealthCheck implement Service method
  9. // 用于检查服务的健康状态,这里仅仅返回true
  10. func (s *CommonService) HealthCheck() bool {
  11. return true
  12. }
  13. func NewCommonService() *CommonService {
  14. return &CommonService{}
  15. }