middleware

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package middleware implements different go-kit middlewares

Package middleware implements different go-kit middlewares

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MiddlewareProviderContract

type MiddlewareProviderContract interface {
	// CreateLoggingMiddleware creates the logging middleware.
	// endpointName: Mandatory. The name of the endpoint
	// Returns the new endpoint with logging middleware added
	CreateLoggingMiddleware(endpointName string) endpoint.Middleware
}

MiddlewareProviderContract declares the methods to be implemented by the middleware provider service that is used to create different instances of go-kit middlewares

func NewMiddlewareProviderService

func NewMiddlewareProviderService(
	logger *zap.Logger,
	logMessageDetails bool,
	dateTimeFormat string) (MiddlewareProviderContract, error)

NewMiddlewareProviderService creates new instance of the middlewareProviderService, setting up all dependencies and returns the instance logger: Mandatory. Reference to the logger service logger: Indicates whether the request and response message details sholuld be logged dateTimeFormat: Optional. If provided, will be used to format the date time object Returns the new service or error if something goes wrong

Jump to

Keyboard shortcuts

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