job

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: Apache-2.0 Imports: 15 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

Functions

func EnqueueWithTracing

func EnqueueWithTracing(ctx context.Context, client *asynq.Client, task *asynq.Task, opts ...asynq.Option) (taskinfo *asynq.TaskInfo, err error)

func Logging

func Logging(logger klog.Logger) asynq.MiddlewareFunc

func NewAsynqClient

func NewAsynqClient(opt asynq.RedisConnOpt) (*asynq.Client, func())

func NewAsynqClientOpt

func NewAsynqClientOpt(r redis.UniversalClient) asynq.RedisConnOpt

func NewUi

func NewUi(root string, opt asynq.RedisConnOpt) http.Handler

func SetTracingOption

func SetTracingOption(ctx context.Context) asynq.Option

func Stack

func Stack() asynq.MiddlewareFunc

func TracingServer

func TracingServer() asynq.MiddlewareFunc

Types

type LazyAsynqServer

type LazyAsynqServer lazy.Of[*asynq.Server]

type RedisFunc

type RedisFunc func() interface{}

func (RedisFunc) MakeRedisClient

func (r RedisFunc) MakeRedisClient() interface{}

type Server

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

func NewServer

func NewServer(opt asynq.RedisConnOpt, opts ...ServerOption) *Server

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

type ServerOption

type ServerOption func(opt *asynq.Config)

func WithConcurrency

func WithConcurrency(c int) ServerOption

func WithQueues

func WithQueues(q map[string]int) ServerOption

type SpanKind

type SpanKind string
const (
	KindProducer SpanKind = "PRODUCER"
	KindConsumer SpanKind = "CONSUMER"
)

Jump to

Keyboard shortcuts

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