endpoint

package
v0.0.0-...-31e44ea Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeDiscoveryEndpoint

func MakeDiscoveryEndpoint(svc service.Service) endpoint.Endpoint

MakeDiscoveryEndpoint 创建服务发现的 Endpoint

func MakeHealthCheckEndpoint

func MakeHealthCheckEndpoint(svc service.Service) endpoint.Endpoint

MakeHealthCheckEndpoint 创建健康检查Endpoint

func MakeSayHelloEndpoint

func MakeSayHelloEndpoint(svc service.Service) endpoint.Endpoint

MakeSayHelloEndpoint 创建打招呼 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 HealthRequest

type HealthRequest struct{}

HealthRequest 健康检查请求结构

type HealthResponse

type HealthResponse struct {
	Status bool `json:"status"`
}

HealthResponse 健康检查响应结构

type SayHelloRequest

type SayHelloRequest struct {
}

SayHelloRequest 打招呼请求结构体

type SayHelloResponse

type SayHelloResponse struct {
	Message string `json:"message"`
}

SayHelloResponse 打招呼响应结构体

Jump to

Keyboard shortcuts

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