dureq

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package dureq provides top-level convenience constructors for the dureq distributed job scheduling system backed by Redis.

Server:

server, _ := dureq.NewServer(
    dureq.WithRedisURL("redis://localhost:6379"),
    dureq.WithNodeID("node-1"),
)
server.RegisterHandler(types.HandlerDefinition{...})
server.Start(ctx)

Client:

client, _ := dureq.NewClient(dureq.WithClientRedisURL("redis://localhost:6379"))
client.Enqueue(ctx, "email.send", payload)

Index

Constants

This section is empty.

Variables

View Source
var (
	WithRedisURL       = server.WithRedisURL
	WithRedisPassword  = server.WithRedisPassword
	WithRedisDB        = server.WithRedisDB
	WithRedisPoolSize  = server.WithRedisPoolSize
	WithNodeID         = server.WithNodeID
	WithMaxConcurrency = server.WithMaxConcurrency
	//WithSchedulerTickInterval = server.WithSchedulerTickInterval
	//WithHeartbeatInterval     = server.WithHeartbeatInterval
	//WithElectionTTL           = server.WithElectionTTL
	//WithLockTTL               = server.WithLockTTL
	//WithLogger                = server.WithLogger
	WithKeyPrefix     = server.WithKeyPrefix
	WithPriorityTiers = server.WithPriorityTiers
	WithRedisSentinel = server.WithRedisSentinel
	WithRedisCluster  = server.WithRedisCluster
)

Server options — re-export from internal/server.

View Source
var (
	WithClientRedisURL   = client.WithRedisURL
	WithClientRedisStore = client.WithStore
	WithClientKeyPrefix  = client.WithKeyPrefix
	WithClientTiers      = client.WithPriorityTiers
)

Client options — re-export from pkg/client.

Functions

func NewClient

func NewClient(opts ...client.Option) (*client.Client, error)

NewClient creates a new dureq client for enqueuing jobs.

func NewServer

func NewServer(opts ...server.Option) (*server.Server, error)

NewServer creates a new dureq server node.

Types

type TierConfig

type TierConfig = store.TierConfig

Re-export store types commonly needed by users.

Jump to

Keyboard shortcuts

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