addservice

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTwoZeroes ...
	ErrTwoZeroes = errors.New("cann't sum two zeroes")

	// ErrIntOverflow ...
	ErrIntOverflow = errors.New("integer overflow")

	// ErrMaxSizeExceeded ...
	ErrMaxSizeExceeded = errors.New("result exceeds maximum size")
)

Functions

This section is empty.

Types

type Middleware

type Middleware func(Service) Service

Middleware ...

func InstrumentingMiddleware

func InstrumentingMiddleware(ints, chars metrics.Counter) Middleware

InstrumentingMiddleware ...

func LoggingMiddleware

func LoggingMiddleware(logger log.Logger) Middleware

LoggingMiddleware ...

type Service

type Service interface {
	Sum(ctx context.Context, a, b int) (int, error)
	Concat(ctx context.Context, a, b string) (string, error)
}

Service ...

func New

func New(logger log.Logger, ints, chars metrics.Counter) Service

New ...

func NewBasicService

func NewBasicService() Service

NewBasicService ...

Jump to

Keyboard shortcuts

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