Skip to content

Commit fbd8614

Browse files
need to customized timeout in struct Options (#39)
Co-authored-by: ken <[email protected]>
1 parent 7e8a2b6 commit fbd8614

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

options.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ func WithFn(fn func(context.Context, QueuedMessage) error) Option {
5252
}
5353
}
5454

55+
// WithTimeOut set custom timeout
56+
func WithTimeOut(t time.Duration) Option {
57+
return func(q *Options) {
58+
q.timeout = t
59+
}
60+
}
61+
5562
type Options struct {
5663
workerCount int
5764
timeout time.Duration

0 commit comments

Comments
 (0)