warning

package
v3.32.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package warning communicates warnings over gRPC headers. The Add func is used by the server to add a warning header. The client interceptors log warnings to the logger in the context, or to the default logger.

Note that headers are currently not supported by ServeHTTP of the gRPC server. This means that warnings may not be received by clients using the fallback server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(ctx context.Context, message string)

Add a warning to the response headers.

func StreamClientInterceptor

func StreamClientInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error)

StreamClientInterceptor is a streaming client interceptor that logs warnings sent by the server.

func UnaryClientInterceptor

func UnaryClientInterceptor(ctx context.Context, method string, req, reply any, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error

UnaryClientInterceptor is a unary client interceptor that logs warnings sent by the server.

Types

This section is empty.

Jump to

Keyboard shortcuts

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