package
0.0.0-20240910131244-13d20f98e541
Repository: https://github.com/redhatinsights/edge-api.git
Documentation: pkg.go.dev
# Functions
CorrID returns job id or an empty string when not set.
Enqueue sends an existing job to the worker queue.
InitDummyWorker initializes the dummy (testing) worker queue with an in-memory worker.
InitMemoryWorker initializes the default worker queue with an in-memory worker.
JobID returns job id or an empty string when not set.
New creates new job and sets identity and correlation id from passed context.
NewAndEnqueue sends an existing job to the fast worker queue.
NewAndEnqueueSlow sends an existing job to the slow worker queue.
No description provided by the author
No description provided by the author
No description provided by the author
RegisterHandlers registers a job handler for a specific job type.
WithCorrID returns context copy with trace id value.
WithJobID returns context copy with trace id value.
Worker returns the default worker queue.
# Variables
No description provided by the author
No description provided by the author
IgnoredJobHandler is a handler that does nothing.
No description provided by the author
# Structs
No description provided by the author
Dummy worker is useful for unit tests - it immediately processes the job, there is no queue or background goroutines.
Job represents a single job.
No description provided by the author
Stats provides monitoring statistics.
# Interfaces
JobEnqueuer sends Job messages into worker queue.
JobWorker receives and handles Job messages.
# Type aliases
JobHandler is a function that processes a job.
JobQueue represents a queue where job is enqueued.
JobType represents a "channel" for jobs.