middleware

package
v0.0.0-...-39ca940 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateStreamClientInterceptor

func GenerateStreamClientInterceptor(trace bool, logger MethodLogger) grpc.StreamClientInterceptor

GenerateStreamClientInterceptor creates an interceptor function that will log grpc streaming calls.

func GenerateUnaryClientInterceptor

func GenerateUnaryClientInterceptor(label string, trace bool, logger MethodLogger) grpc.UnaryClientInterceptor

GenerateUnaryClientInterceptor creates an interceptor function that will log unary grpc calls.

Types

type FittedSolutionMessage

type FittedSolutionMessage interface {
	GetFittedSolutionId() string
}

FittedSolutionMessage represents API messages that have a fitted solution ID.

type LoggingClientStream

type LoggingClientStream struct {
	grpc.ClientStream
	// contains filtered or unexported fields
}

LoggingClientStream implements a GRPC client stream that logs output

func (*LoggingClientStream) RecvMsg

func (c *LoggingClientStream) RecvMsg(m interface{}) error

RecvMsg logs messages recieved over a GRPC stream

func (*LoggingClientStream) SendMsg

func (c *LoggingClientStream) SendMsg(m interface{}) error

SendMsg logs messages sent out over a GRPC stream

type MethodLogger

type MethodLogger interface {
	LogAPIAction(method string, params map[string]string)
}

MethodLogger logs GRPC method calls.

type SolutionMessage

type SolutionMessage interface {
	GetSolutionId() string
}

SolutionMessage represents API messages that have a solution ID.

Jump to

Keyboard shortcuts

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