example

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CountHandler, _ = disq.RegisterTask(&disq.TaskOptions{
	Name:       "CountHandler",
	Handler:    counthandler(),
	RetryLimit: 3,
})

create task

View Source
var RBroker1 = NewBroker(Redis, 1000, "disq10")
View Source
var RBroker2 = NewBroker(Redis, 100, "disq9")
View Source
var RBroker3 = NewBroker(Redis, 10, "disq8")
View Source
var RWorker = NewWorker(Redis, []disq.Broker{RBroker1.Broker, RBroker2.Broker, RBroker3.Broker})
View Source
var (
	Redis, _ = NewClient()
)

Functions

func NewClient

func NewClient() (*redis.Client, error)

Create Redis client

func WaitSignal

func WaitSignal() os.Signal

Types

type EndpointError

type EndpointError struct {
	Err error
	// contains filtered or unexported fields
}

func (*EndpointError) Delay

func (e *EndpointError) Delay() time.Duration

func (*EndpointError) Error

func (e *EndpointError) Error() string

type MsgValue added in v0.1.4

type MsgValue struct {
	Name  string
	Value string
}

type RedisBroker

type RedisBroker struct {
	Name   string
	Broker disq.Broker
	// contains filtered or unexported fields
}

func NewBroker

func NewBroker(c *redis.Client, concurency int, name string) *RedisBroker

Create new broker

type Worker

type Worker struct {
	Worker *worker.Worker
	// contains filtered or unexported fields
}

func NewWorker

func NewWorker(c *redis.Client, brokers []disq.Broker) *Worker

create new worker

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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