Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterGRPC ¶ added in v0.1.3
func RegisterGRPC(config *RegisterConfig, svc *grpc.Server)
RegisterGRPC GRPC方式注册到consul
Types ¶
type HealthImpl ¶ added in v0.1.7
type HealthImpl struct{}
HealthImpl 健康检查实现
func (*HealthImpl) Check ¶ added in v0.1.7
func (h *HealthImpl) Check(ctx context.Context, req *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
Check 实现健康检查接口,这里直接返回健康状态,这里也可以有更复杂的健康检查策略,比如根据服务器负载来返回
func (*HealthImpl) Watch ¶ added in v0.1.7
func (h *HealthImpl) Watch(request *grpc_health_v1.HealthCheckRequest, server grpc_health_v1.Health_WatchServer) error
Watch 流式检测
Click to show internal directories.
Click to hide internal directories.