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 CountEndpoint

func CountEndpoint(svc generated.StringService) endpoint.Endpoint

func DummyMethodEndpoint

func DummyMethodEndpoint(svc generated.StringService) 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 TestCaseEndpoint

func TestCaseEndpoint(svc generated.StringService) endpoint.Endpoint

func UppercaseEndpoint

func UppercaseEndpoint(svc generated.StringService) endpoint.Endpoint

Types

type CountRequest

type CountRequest struct {
	Text   string `json:"text"`
	Symbol string `json:"symbol"`
}

type CountResponse

type CountResponse struct {
	Count     int   `json:"count"`
	Positions []int `json:"positions"`
}

type DummyMethodRequest

type DummyMethodRequest struct{}

Formal exchange type, please do not delete.

type DummyMethodResponse

type DummyMethodResponse struct{}

Formal exchange type, please do not delete.

type EndpointsSet

type EndpointsSet struct {
	UppercaseEndpoint   endpoint.Endpoint
	CountEndpoint       endpoint.Endpoint
	TestCaseEndpoint    endpoint.Endpoint
	DummyMethodEndpoint endpoint.Endpoint
}

EndpointsSet implements StringService API and used for transport purposes.

func Endpoints

func Endpoints(svc generated.StringService) 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) Count

func (set EndpointsSet) Count(arg0 context.Context, arg1 string, arg2 string) (res0 int, res1 []int, res2 error)

func (EndpointsSet) DummyMethod

func (set EndpointsSet) DummyMethod(arg0 context.Context) (res0 error)

func (EndpointsSet) IgnoredErrorMethod

func (set EndpointsSet) IgnoredErrorMethod() (res0 error)

func (EndpointsSet) IgnoredMethod

func (set EndpointsSet) IgnoredMethod()

func (EndpointsSet) TestCase

func (set EndpointsSet) TestCase(arg0 context.Context, arg1 []*generated.Comment) (res0 map[string]int, res1 error)

func (EndpointsSet) Uppercase

func (set EndpointsSet) Uppercase(arg0 context.Context, arg1 map[string]string) (res0 string, res1 error)

type TestCaseRequest

type TestCaseRequest struct {
	Comments []*generated.Comment `json:"comments"`
}

type TestCaseResponse

type TestCaseResponse struct {
	Tree map[string]int `json:"tree"`
}

type UppercaseRequest

type UppercaseRequest struct {
	StringsMap map[string]string `json:"strings_map"`
}

type UppercaseResponse

type UppercaseResponse struct {
	Ans string `json:"ans"`
}

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