Documentation
¶
Index ¶
- func MakeDiscoveryEndpoint(svc service.Service) endpoint.Endpoint
- func MakeHealthCheckEndpoint(svc service.Service) endpoint.Endpoint
- func MakeSayHelloEndpoint(svc service.Service) endpoint.Endpoint
- type DiscoveryEndpoints
- type DiscoveryRequest
- type DiscoveryResponse
- type HealthRequest
- type HealthResponse
- type SayHelloRequest
- type SayHelloResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeDiscoveryEndpoint ¶
MakeDiscoveryEndpoint 创建服务发现的 Endpoint
func MakeHealthCheckEndpoint ¶
MakeHealthCheckEndpoint 创建健康检查Endpoint
Types ¶
type DiscoveryEndpoints ¶
type DiscoveryEndpoints struct { SayHelloEndpoint endpoint.Endpoint // 打招呼端点 DiscoveryEndpoint endpoint.Endpoint // 服务发现端点 HealthCheckEndpoint endpoint.Endpoint // 健康检查端点 }
DiscoveryEndpoints 服务发现端点服务
type DiscoveryRequest ¶
type DiscoveryRequest struct {
ServiceName string
}
DiscoveryRequest 服务发现请求结构体
type DiscoveryResponse ¶
type DiscoveryResponse struct { Instances []interface{} `json:"instances"` Error string `json:"error"` }
DiscoveryResponse 服务发现响应结构体
type HealthResponse ¶
type HealthResponse struct {
Status bool `json:"status"`
}
HealthResponse 健康检查响应结构
type SayHelloResponse ¶
type SayHelloResponse struct {
Message string `json:"message"`
}
SayHelloResponse 打招呼响应结构体
Click to show internal directories.
Click to hide internal directories.