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 ¶
- Variables
- func NewClient(opts ...client.Option) (*client.Client, error)
- func NewServer(opts ...server.Option) (*server.Server, error)
- type APIService
- type ApiError
- type AuditEntry
- type BatchFilter
- type BulkRequest
- type BulkResult
- type Client
- type DailyStatsEntry
- type Dispatcher
- type EnqueueGroupOption
- type EnqueueRequest
- type EventFilter
- type GroupAggregator
- type GroupAggregatorFunc
- type GroupConfig
- type GroupInfo
- type Hub
- type JobFilter
- type JobStats
- type QueueInfo
- type RedisStore
- type RunFilter
- type ScheduleFilter
- type Server
- type StatsFilter
- type StatsResponse
- type TierConfig
- type UniqueKeyResult
- type WSClient
- type WorkflowAuditEntry
- type WorkflowFilter
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 ¶
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 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 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 RedisStore ¶ added in v0.1.5
type RedisStore = store.RedisStore
type ScheduleFilter ¶ added in v0.1.8
type ScheduleFilter = store.ScheduleFilter
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
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
Click to show internal directories.
Click to hide internal directories.