Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotServiceInstances = errors.New("instances are not existed")
Functions ¶
This section is empty.
Types ¶
type DiscoveryServiceImpl ¶
type DiscoveryServiceImpl struct {
// contains filtered or unexported fields
}
func (*DiscoveryServiceImpl) DiscoveryService ¶
func (service *DiscoveryServiceImpl) DiscoveryService(ctx context.Context, serviceName string) ([]interface{}, error)
func (*DiscoveryServiceImpl) HealthCheck ¶
func (*DiscoveryServiceImpl) HealthCheck() bool
HealthCheck implement Service method 用于检查服务的健康状态,这里仅仅返回true
func (*DiscoveryServiceImpl) SayHello ¶
func (*DiscoveryServiceImpl) SayHello() string
type Service ¶
type Service interface { // HealthCheck check service health status HealthCheck() bool // sayHelloService SayHello() string // discovery service from consul by serviceName DiscoveryService(ctx context.Context, serviceName string) ([]interface{}, error) }
func NewDiscoveryServiceImpl ¶
func NewDiscoveryServiceImpl(discoveryClient discover.DiscoveryClient) Service
Click to show internal directories.
Click to hide internal directories.