addendpoint

package
v0.0.0-...-d0adc60 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstrumentingMiddleware

func InstrumentingMiddleware(duration metrics.Histogram) endpoint.Middleware

InstrumentingMiddleware ...

func LoggingMiddleware

func LoggingMiddleware(logger log.Logger) endpoint.Middleware

LoggingMiddleware ...

func MakeConcatEndpoint

func MakeConcatEndpoint(s addservice.Service) endpoint.Endpoint

func MakeSumEndpoint

func MakeSumEndpoint(s addservice.Service) endpoint.Endpoint

Types

type ConcatRequest

type ConcatRequest struct {
	A, B string
}

type ConcatResponse

type ConcatResponse struct {
	V   string `json:"v"`
	Err error  `json:"-"`
}

func (ConcatResponse) Failed

func (r ConcatResponse) Failed() error

type Set

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

func New

func New(svc addservice.Service, logger log.Logger, duration metrics.Histogram, otTracer stdopentracing.Tracer, zipkinTracer *stdzipkin.Tracer) Set

func (Set) Concat

func (s Set) Concat(ctx context.Context, a, b string) (string, error)

Concat ...

func (Set) Sum

func (s Set) Sum(ctx context.Context, a, b int) (int, error)

Sum ...

type SumRequest

type SumRequest struct {
	A, B int
}

type SumResponse

type SumResponse struct {
	V   int   `json:"v"`
	Err error `json:"-"`
}

func (SumResponse) Failed

func (r SumResponse) Failed() error

Jump to

Keyboard shortcuts

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