Documentation
¶
Overview ¶
Package grpc provides common tools, which can be used working with gRPC.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServerLoggingUnaryInterceptor ¶ added in v1.1.6
func ServerLoggingUnaryInterceptor( logger *slog.Logger, ) func(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error)
ServerLoggingUnaryInterceptor intercepts gRPC handler, logs request with provided request ID and calls handler.
Types ¶
type BaseError ¶
type BaseError struct {
Message string `json:"message"`
BaseErr error `json:"baseErr"`
Status codes.Code `json:"-"`
}
BaseError is a base gRPC error, which is used to inform clients, that something went wrong between microservices.
func (BaseError) GRPCStatus ¶
GRPCStatus is a member function, which is used by gRPC when converting an error into a status.
Click to show internal directories.
Click to hide internal directories.