transport

package
v0.0.0-...-0f723c4 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConcatEndpoint

func ConcatEndpoint(svc addsvc.Service) endpoint.Endpoint

func LatencyMiddleware

func LatencyMiddleware(dur metrics.Histogram, methodName string) endpoint.Middleware

func RequestFrequencyMiddleware

func RequestFrequencyMiddleware(freq metrics.Gauge, methodName string) endpoint.Middleware

func SumEndpoint

func SumEndpoint(svc addsvc.Service) endpoint.Endpoint

Types

type ConcatRequest

type ConcatRequest struct {
	A string `json:"a"`
	B string `json:"b"`
}

type ConcatResponse

type ConcatResponse struct {
	Result string `json:"result"`
}

type EndpointsSet

type EndpointsSet struct {
	SumEndpoint    endpoint.Endpoint
	ConcatEndpoint endpoint.Endpoint
}

EndpointsSet implements Service API and used for transport purposes.

func Endpoints

func Endpoints(svc addsvc.Service) EndpointsSet

func InstrumentingEndpoints

func InstrumentingEndpoints(endpoints EndpointsSet, tracer opentracinggo.Tracer) EndpointsSet

func TraceClientEndpoints

func TraceClientEndpoints(endpoints EndpointsSet, tracer opentracinggo.Tracer) EndpointsSet

TraceClientEndpoints is used for tracing endpoints on client side.

func TraceServerEndpoints

func TraceServerEndpoints(endpoints EndpointsSet, tracer opentracinggo.Tracer) EndpointsSet

TraceServerEndpoints is used for tracing endpoints on server side.

func (EndpointsSet) Concat

func (set EndpointsSet) Concat(arg0 context.Context, arg1 string, arg2 string) (res0 string, res1 error)

func (EndpointsSet) Sum

func (set EndpointsSet) Sum(arg0 context.Context, arg1 int, arg2 int) (res0 int, res1 error)

type SumRequest

type SumRequest struct {
	A int `json:"a"`
	B int `json:"b"`
}

type SumResponse

type SumResponse struct {
	Result int `json:"result"`
}

Directories

Path Synopsis
Please, do not change functions names!
Please, do not change functions names!
Please, do not change functions names!
Please, do not change functions names!

Jump to

Keyboard shortcuts

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