uuid

package
v0.0.0-...-94dd193 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package uuid provides helpers for propagating UUIDs across services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attach

func Attach() grpctransport.ClientOption

Attach adds the UUID values stored in context to the gRPC request metadata.

func FromContext

func FromContext(ctx context.Context) (string, bool)

FromContext returns the UUID value stored in ctx, if any.

func NewContext

func NewContext(ctx context.Context, uuid string) context.Context

NewContext creates a new context with the UUID set to the provided value

func NewForRequest

func NewForRequest() string

NewForRequest returns a Random (Version 4) UUID string. If the UUID fails to generate an empty string will be returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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