Documentation ¶
Index ¶
Constants ¶
View Source
const ( StringServiceCommandName = "String.string" StringService = "string" )
Service constants
Variables ¶
View Source
var (
ErrHystrixFallbackExecute = errors.New("hystrix fall back execute")
)
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface { // 远程调用 string-service 服务 UseStringService(operationType, a, b string) (string, error) // 健康检查 HealthCheck() bool }
Service Define a service interface
func NewUseStringService ¶
func NewUseStringService(client discover.DiscoveryClient, lb loadbalance.LoadBalance) Service
type ServiceMiddleware ¶
ServiceMiddleware define service middleware
type StringResponse ¶
StringResponse define response struct
type UseStringService ¶
type UseStringService struct {
// contains filtered or unexported fields
}
ArithmeticService implement Service interface
func (UseStringService) HealthCheck ¶
func (s UseStringService) HealthCheck() bool
HealthCheck implement Service method 用于检查服务的健康状态,这里仅仅返回true。
func (UseStringService) UseStringService ¶
func (s UseStringService) UseStringService(operationType, a, b string) (string, error)
Click to show internal directories.
Click to hide internal directories.