requestid

package
v0.0.235 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachRequestIDToError added in v0.0.161

func AttachRequestIDToError(err error, reqid RequestID) error

Types

type Interceptor

type Interceptor struct{}

func (Interceptor) Streaming

func (Interceptor) Streaming(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error

func (Interceptor) Unary

func (Interceptor) Unary(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

type RequestData

type RequestData struct {
	Started   time.Time
	RequestID RequestID
}

func AllocateRequestID added in v0.0.197

func AllocateRequestID(ctx context.Context) (context.Context, RequestData)

func RequestDataFromContext

func RequestDataFromContext(ctx context.Context) (RequestData, bool)

type RequestID added in v0.0.161

type RequestID string

func NewID added in v0.0.161

func NewID() RequestID

func RequestIDFromContext

func RequestIDFromContext(ctx context.Context) (RequestID, bool)

Jump to

Keyboard shortcuts

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