Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmpty = errors.New("empty string")
ErrEmpty is returned when an input string is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware func(StringService) StringService
Middleware describes a service (as opposed to endpoint) middleware.
func InstrumentingMiddleware ¶
func InstrumentingMiddleware() Middleware
InstrumentingMiddleware returns a service middleware that count the number of jobs processed, record the duration of requests after they’ve finished and track the number of in-flight operations.
func LoggingMiddleware ¶
func LoggingMiddleware(logger log.Logger) Middleware
LoggingMiddleware takes a logger as a dependency and returns a ServiceMiddleware.
type StringService ¶
StringService provides operations on strings.
func New ¶
func New(logger log.Logger) StringService
New returns a basic Service with all of the expected middlewares wired in.
func NewStringService ¶
func NewStringService() StringService
NewStringService returns a naïve, stateless implementation of StringService.
Click to show internal directories.
Click to hide internal directories.