asynq

package
v0.1.293-herb-asynq-dd... Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*asynq.Client
	// contains filtered or unexported fields
}

Client is a traced version of asynq.Client.

func WrapClient

func WrapClient(c *asynq.Client, opts ...Option) *Client

WrapClient wraps a asynq.Client so that all requests are traced.

func (*Client) Enqueue

func (c *Client) Enqueue(task *asynq.Task, opts ...asynq.Option) (taskInfo *asynq.TaskInfo, err error)

Enqueue enqueues a task and returns a task info.

type Option

type Option func(cfg *config)

An Option customizes the config.

func WithAnalytics

func WithAnalytics(on bool) Option

WithAnalytics enables Trace Analytics for all started spans.

func WithAnalyticsRate

func WithAnalyticsRate(rate float64) Option

WithAnalyticsRate sets the sampling rate for Trace Analytics events correlated to started spans.

func WithServiceName

func WithServiceName(serviceName string) Option

WithServiceName sets the config service name to serviceName.

Jump to

Keyboard shortcuts

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