trace

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSimpleReqIDToContext

func AddSimpleReqIDToContext(ctx context.Context, reqID string) context.Context

AddSimpleReqIDToContext adds the simple request ID to the context

func GenerateSimpleReqID

func GenerateSimpleReqID() string

GenerateSimpleReqID generates a simple request ID

func GetSimpleReqIDFromContext

func GetSimpleReqIDFromContext(ctx context.Context) string

GetSimpleReqIDFromContext returns the simple request ID from the context if no simple request ID is found, returns an empty string

func MustGetSimpleReqIDFromContext

func MustGetSimpleReqIDFromContext(ctx context.Context) (context.Context, string)

MustGetSimpleReqIDFromContext returns the simple request ID from the context if no simple request ID is found, generates a new one and returns it and adds it to the context if simple request ID is found, returns new ctx with the simple request ID

func ServerSimpleRequestIDUnaryInterceptor

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

ServerSimpleRequestIDUnaryInterceptor returns a new unary server interceptor for simple request ID if reqID is not found in the context, generates a new one and adds it to the context

Types

This section is empty.

Jump to

Keyboard shortcuts

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