redis

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// QueueCritical queue priority
	QueueCritical = "critical"
	QueueDefault  = "default"
	QueueLow      = "low"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server async server

func NewServer

func NewServer(redisOpt asynq.RedisClientOpt, asyncCfg asynq.Config) *Server

NewServer new async server

func (*Server) RegisterHandler

func (s *Server) RegisterHandler(pattern string, handler func(context.Context, *asynq.Task) error)

RegisterHandler register handler

func (*Server) Start

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

Start async server

func (*Server) Stop

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

Stop async server

type ServerOption

type ServerOption func(o *Server)

ServerOption is cron server option.

func WithAddress

func WithAddress(addr string) ServerOption

WithAddress with server address.

Jump to

Keyboard shortcuts

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