session

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package session carries the active envelope (and the trace/session/conversation metadata it implies) on the context so downstream handlers and nested Bus calls can propagate it without re-parsing the message.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Conversation

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

Conversation returns (conversation_id, true) if an envelope with a non-empty ConversationID is present on ctx.

func From

func From(ctx context.Context) *event.Envelope

From returns the envelope previously stored via Inject, or nil if none.

func Inject

func Inject(ctx context.Context, e *event.Envelope) context.Context

Inject stores the envelope in ctx. Passing a nil envelope returns ctx unchanged.

func Session

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

Session returns (session_id, true) if an envelope with a non-empty SessionID is present on ctx.

func Tenant

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

Tenant returns (tenant_id, true) if an envelope with a non-empty TenantID is present on ctx.

func Trace

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

Trace returns (trace_id, true) if an envelope with a non-empty TraceID is present on ctx.

Types

This section is empty.

Jump to

Keyboard shortcuts

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