Documentation
¶
Overview ¶
Package goqueue instruments github.com/levskiy0/go-queue dispatches, job execution, and queue statistics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job = queuecontract.Job
Job aliases the go-queue job contract wrapped during execution.
func ProfileJobs ¶
ProfileJobs instruments jobs with the default profiler.
type ProfilerGoQueue ¶
type ProfilerGoQueue struct {
DefaultQueue string
}
ProfilerGoQueue implements webpprof.Integration for queue instances.
func New ¶
func New(names ...string) ProfilerGoQueue
New creates a queue integration. The first non-empty name becomes the default queue label and defaults to "default".
func (ProfilerGoQueue) Name ¶
func (ProfilerGoQueue) Name() string
Name returns the queue integration cache namespace.
type ProfilerJobs ¶
type ProfilerJobs struct {
Queue string
}
ProfilerJobs implements webpprof.Integration for registered job slices.
func (ProfilerJobs) Name ¶
func (d ProfilerJobs) Name() string
Name returns the job integration cache namespace.
type Queue ¶
type Queue = queuecontract.Queue
Queue aliases the go-queue facade accepted by Profile.
type Task ¶
type Task = queuecontract.Task
Task aliases the go-queue dispatch builder returned by profiled queues.
func ChainContext ¶
ChainContext is the context-aware counterpart of queue.Chain.
func JobContext ¶
JobContext creates a task whose dispatch event is correlated with the request capture stored in ctx. The underlying go-queue Task API does not accept a context, so request handlers should use this helper instead of queue.Job when dispatches need to appear in the request details.