diagnostics

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const CorrelationIdMetadataKey string = "correlation-id-4b54b6c9-647a-4929-be87-481ba63fc04d"
View Source
const CorrelationIdcontext_key context_key = 0

Variables

This section is empty.

Functions

func GetCorrelationIdFromContext

func GetCorrelationIdFromContext(ctx context.Context) string

Fetch the correlation-id from context, that was either previously set in the current call-stack by using the NewContextWithCorrelationId function, or set by the client before making gPRC call.

func GetCorrelationIdFromIncomingContext

func GetCorrelationIdFromIncomingContext(ctx context.Context) string

For server-side MOC agent to pick the correlation-id which is previously set by gRPC client by using the NewContextWithCorrelationId function

func NewContextWithCorrelationId

func NewContextWithCorrelationId(parent context.Context, correlationId string) context.Context

Replace the context by using this method before making gRPC calls to MOC cloud/node agent, the specified correlation-id will also be passed to server.

Types

This section is empty.

Jump to

Keyboard shortcuts

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