service

package
v0.0.0-...-5d8c97e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CalculatorService

type CalculatorService struct {
}

CalculatorService 计算器服务

func NewCalculatorService

func NewCalculatorService() *CalculatorService

NewCalculatorService 构建计算器服务对象

func (*CalculatorService) Add

func (service *CalculatorService) Add(ctx context.Context, a, b int32) (int32, error)

Add 加法

func (*CalculatorService) Div

func (service *CalculatorService) Div(ctx context.Context, m, n int32) (float32, error)

Div 除法

func (*CalculatorService) Mul

func (service *CalculatorService) Mul(ctx context.Context, e, f int32) (int32, error)

Mul 乘法

func (*CalculatorService) Sub

func (service *CalculatorService) Sub(ctx context.Context, c, d int32) (int32, error)

Sub 减法

type HealthService

type HealthService struct {
}

HealthService 健康检查服务

func NewHealthService

func NewHealthService() *HealthService

NewHealthService 创建健康检查服务

func (*HealthService) Check

func (healthService *HealthService) Check(ctx context.Context, serviceName string) (protocol.HealthServiceStatus, error)

Check 检查指定服务的健康状况

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL