middleware

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2019 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthShutdown

func HealthShutdown()

func NewStreamLogger

func NewStreamLogger(logger *zap.Logger) grpc.StreamServerInterceptor

func NewStreamPrometheus

func NewStreamPrometheus() grpc.StreamServerInterceptor

func NewUnaryLogger

func NewUnaryLogger(logger *zap.Logger) grpc.UnaryServerInterceptor

func NewUnaryPrometheus

func NewUnaryPrometheus() grpc.UnaryServerInterceptor

func SetHealthStatus

func SetHealthStatus(serviceName string, status grpc_health_v1.HealthCheckResponse_ServingStatus)

Types

type EmptyGrpcService

type EmptyGrpcService struct{}

EmptyServerOption does not alter the server configuration. It can be embedded in another structure to build custom server options.

func (EmptyGrpcService) RegisterService

func (EmptyGrpcService) RegisterService(*grpc.Server)

type FuncGrpcService

type FuncGrpcService func(*grpc.Server)

FuncServerOption wraps a function that modifies serverOptions into an implementation of the ServerOption interface.

func NewFuncGrpcService

func NewFuncGrpcService(f func(*grpc.Server)) FuncGrpcService

func (FuncGrpcService) RegisterService

func (f FuncGrpcService) RegisterService(s *grpc.Server)

type GrpcService

type GrpcService interface {
	RegisterService(*grpc.Server)
}

A ServerOption sets options such as credentials, codec and keepalive parameters, etc.

type Healthz

type Healthz struct {
	FuncGrpcService
}

func NewHealthz

func NewHealthz() *Healthz

type Logger

type Logger struct {
	FuncGrpcService
}

func NewLogger

func NewLogger(logger *zap.Logger) *Logger

type Prometheus

type Prometheus struct {
	FuncGrpcService
}

func NewPrometheus

func NewPrometheus() *Prometheus

type Reflect

type Reflect struct {
	FuncGrpcService
}

func NewReflection

func NewReflection() *Reflect

Jump to

Keyboard shortcuts

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