Documentation
¶
Overview ¶
Package jobtype provides job type classification for observability.
Job types allow distinguishing between interactive user requests and background maintenance tasks in metrics and logs.
Usage:
// In background jobs (archiver, enrichment): ctx = jobtype.WithJobType(ctx, jobtype.Background) // In metrics/logging code: jt := jobtype.FromContext(ctx) // Returns Interactive if not set
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JobType ¶
type JobType string
JobType classifies the type of operation for observability purposes.
const ( // Interactive represents user-facing operations: chat, tool calls, etc. // This is the default when no job type is explicitly set. Interactive JobType = "interactive" // Background represents maintenance tasks: archiver, enrichment, consolidation. // These operations are expected to be slower and more expensive. Background JobType = "background" )
func FromContext ¶
FromContext extracts the job type from context. Returns Interactive as a safe default if no job type is set.
Click to show internal directories.
Click to hide internal directories.