modulepackage
1.0.1
Repository: https://github.com/tryfix/traceable-context.git
Documentation: pkg.go.dev
# README
Traceable Context
Traceable Context is a wrapper around go context which will provide a way to share a traceable UUID between different contexts
- New context
package main
import (
"github.com/google/uuid"
"github.com/tryfix/traceable-context"
)
func main() {
ctx := traceable_context.WithUUID(uuid.New())
}
- Context from a parent context
parent := contect.Background()
ctx := traceable_context.WithUUID(parent, uuid.New())
# Functions
No description provided by the author
FromContext extracts the UUID from a given context.
FromContextWithUUID creates a new traceable context from a given parent context and a UUID.
No description provided by the author
No description provided by the author
No description provided by the author
WithUUID creates a new traceable context from a given UUID.
No description provided by the author
# Interfaces
TraceableContext wrap the go context with a traceable uuid.