dureq

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: Apache-2.0 Imports: 6 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
	WithRedisUsername         = server.WithRedisUsername
	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
	WithGroupAggregation      = server.WithGroupAggregation
	WithRetentionPeriod       = server.WithRetentionPeriod
	WithShutdownTimeout       = server.WithShutdownTimeout
)

Server options — re-export from internal/server.

View Source
var (
	WithClientRedisURL      = client.WithRedisURL
	WithClientRedisUsername = client.WithRedisUsername
	WithClientRedisPassword = client.WithRedisPassword
	WithClientRedisDB       = client.WithRedisDB
	WithClientRedisPoolSize = client.WithRedisPoolSize
	WithClientKeyPrefix     = client.WithKeyPrefix
	WithClientTiers         = client.WithPriorityTiers
	WithClientClusterAddrs  = client.WithClusterAddrs
	WithClientRedisStore    = client.WithStore
)

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 APIService added in v0.1.5

type APIService = monitor.APIService

func NewAPIService added in v0.1.5

func NewAPIService(s *RedisStore, disp Dispatcher, logger gochainedlog.Logger) *APIService

Re-export APIService

type ApiError added in v0.1.9

type ApiError = monitor.ApiError

type AuditEntry added in v0.1.8

type AuditEntry = store.AuditEntry

type BatchFilter added in v0.1.8

type BatchFilter = store.BatchFilter

type BulkRequest added in v0.1.9

type BulkRequest = monitor.BulkRequest

type BulkResult added in v0.1.9

type BulkResult = monitor.BulkResult

type Client added in v0.1.6

type Client = client.Client

type DailyStatsEntry added in v0.1.9

type DailyStatsEntry = monitor.DailyStatsEntry

type Dispatcher added in v0.1.5

type Dispatcher = monitor.Dispatcher

type EnqueueGroupOption added in v0.1.3

type EnqueueGroupOption = types.EnqueueGroupOption

Re-export types for group aggregation.

type EnqueueRequest added in v0.1.3

type EnqueueRequest = client.EnqueueRequest

Re-export client types commonly needed by users.

type EventFilter added in v0.1.8

type EventFilter = store.EventFilter

type GroupAggregator added in v0.1.3

type GroupAggregator = types.GroupAggregator

type GroupAggregatorFunc added in v0.1.3

type GroupAggregatorFunc = types.GroupAggregatorFunc

type GroupConfig added in v0.1.3

type GroupConfig = types.GroupConfig

type GroupInfo added in v0.1.9

type GroupInfo = monitor.GroupInfo

type Hub added in v0.1.11

type Hub = monitor.Hub

type JobFilter added in v0.1.8

type JobFilter = store.JobFilter

Re-export filter types for custom API handler composition.

type JobStats added in v0.1.8

type JobStats = store.JobStats

type QueueInfo added in v0.1.9

type QueueInfo = monitor.QueueInfo

type RedisStore added in v0.1.5

type RedisStore = store.RedisStore

type RunFilter added in v0.1.8

type RunFilter = store.RunFilter

type ScheduleFilter added in v0.1.8

type ScheduleFilter = store.ScheduleFilter

type Server added in v0.1.6

type Server = server.Server

type StatsFilter added in v0.1.8

type StatsFilter = store.StatsFilter

type StatsResponse added in v0.1.9

type StatsResponse = monitor.StatsResponse

type TierConfig

type TierConfig = store.TierConfig

Re-export store types commonly needed by users.

type UniqueKeyResult added in v0.1.9

type UniqueKeyResult = monitor.UniqueKeyResult

type WSClient added in v0.1.11

type WSClient = monitor.WSClient

Re-export WSClient

func NewWSClient added in v0.1.11

func NewWSClient() *WSClient

type WorkflowAuditEntry added in v0.1.9

type WorkflowAuditEntry = monitor.WorkflowAuditEntry

type WorkflowFilter added in v0.1.8

type WorkflowFilter = store.WorkflowFilter

Jump to

Keyboard shortcuts

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