endpoint

package
v0.0.0-...-312ee99 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidRequestType = errors.New("RequestType has only two type: Concat, Diff")
)

Functions

func MakeHealthCheckEndpoint

func MakeHealthCheckEndpoint(svc service.Service) endpoint.Endpoint

MakeHealthCheckEndpoint 创建健康检查Endpoint

func MakeStringEndpoint

func MakeStringEndpoint(svc service.Service) endpoint.Endpoint

MakeStringEndpoint make endpoint

DoTrace(KeyID string, SpanID string, TraceID string, BizCode string, ParentID string, Level string, ClassName string, MethodName string, LocationDesc string) (string, error)

Types

type HealthRequest

type HealthRequest struct{}

HealthRequest 健康检查请求结构

type HealthResponse

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

HealthResponse 健康检查响应结构

type StringEndpoints

type StringEndpoints struct {
	StringEndpoint      endpoint.Endpoint
	HealthCheckEndpoint endpoint.Endpoint
}

StringEndpoint define endpoint

type StringRequest

type StringRequest struct {
	RequestType  string `json:"request_type"`
	KeyID        string `json:"KeyID"`
	SpanID       string `json:"SpanID"`
	TraceID      string `json:"TraceID"`
	BizCode      string `json:"BizCode"`
	ParentID     string `json:"ParentID"`
	Level        string `json:"Level"`
	ClassName    string `json:"ClassName"`
	MethodName   string `json:"MethodName"`
	LocationDesc string `json:"LocationDesc"`
}

StringRequest define request struct

type StringResponse

type StringResponse struct {
	Result string `json:"result"`
	Error  error  `json:"error"`
}

StringResponse define response struct

Jump to

Keyboard shortcuts

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