Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(registry *supportjobs.Registry, worker *DeliverWorker)
Types ¶
type DeliverArgs ¶
type DeliverArgs struct {
DeliveryID int64 `json:"delivery_id" river:"unique"`
}
func (DeliverArgs) EnqueueOptions ¶
func (DeliverArgs) EnqueueOptions() supportjobs.EnqueueOptions
func (DeliverArgs) Kind ¶
func (DeliverArgs) Kind() string
type DeliverWorker ¶
type DeliverWorker struct {
river.WorkerDefaults[DeliverArgs]
Store DeliveryStore
Client *http.Client
// Secrets 解密 signing secret;nil 时按明文使用(仅测试/无密钥开发)。
Secrets SecretCipher
// Migrator 可选懒迁移明文 secret。
Migrator SecretMigrator
// AllowHTTP 与配置时校验一致;生产应 false。
AllowHTTP bool
Now func() time.Time
}
func (*DeliverWorker) Work ¶
func (w *DeliverWorker) Work(ctx context.Context, job *river.Job[DeliverArgs]) error
type DeliveryStore ¶
Click to show internal directories.
Click to hide internal directories.