endpoint

package
v0.0.0-...-2816995 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: MIT Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeDiscoveryEndpoint

func MakeDiscoveryEndpoint(svc service.Service) endpoint.Endpoint

创建服务发现的 Endpoint

func MakeHealthCheckEndpoint

func MakeHealthCheckEndpoint(svc service.Service) endpoint.Endpoint

MakeHealthCheckEndpoint 创建健康检查Endpoint

func MakeSayHelloEndpoint

func MakeSayHelloEndpoint(svc service.Service) endpoint.Endpoint

创建打招呼 Endpoint

Types

type DiscoveryEndpoints

type DiscoveryEndpoints struct {
	SayHelloEndpoint    endpoint.Endpoint
	DiscoveryEndpoint   endpoint.Endpoint
	HealthCheckEndpoint endpoint.Endpoint
}

type DiscoveryRequest

type DiscoveryRequest struct {
	ServiceName string
}

服务发现请求结构体

type DiscoveryResponse

type DiscoveryResponse struct {
	Instances []interface{} `json:"instances"`
	Error     string        `json:"error"`
}

服务发现响应结构体

type HealthRequest

type HealthRequest struct{}

HealthRequest 健康检查请求结构

type HealthResponse

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

HealthResponse 健康检查响应结构

type SayHelloRequest

type SayHelloRequest struct {
}

打招呼请求结构体

type SayHelloResponse

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

打招呼响应结构体

Jump to

Keyboard shortcuts

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