lorawan-stack: go.thethings.network/lorawan-stack/pkg/rpcmiddleware/warning Index | Files

package warning

import "go.thethings.network/lorawan-stack/pkg/rpcmiddleware/warning"

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

Package Files

warning.go

func Add Uses

func Add(ctx context.Context, message string)

Add a warning to the response headers.

func StreamClientInterceptor Uses

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 Uses

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

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

Package warning imports 4 packages (graph) and is imported by 2 packages. Updated 2020-05-29. Refresh now. Tools for package owners.