mirror of
https://github.com/nats-io/nats.go.git
synced 2025-10-27 10:30:25 +08:00
js: Replace JetStreamManager listers with iterators
This commit is contained in:
8
js.go
8
js.go
@@ -115,7 +115,8 @@ type JetStreamContext interface {
|
||||
|
||||
// js is an internal struct from a JetStreamContext.
|
||||
type js struct {
|
||||
nc *Conn
|
||||
ctx context.Context
|
||||
nc *Conn
|
||||
// For importing JetStream from other accounts.
|
||||
pre string
|
||||
// Amount of time to wait for API requests.
|
||||
@@ -363,6 +364,11 @@ func (ctx ContextOpt) configurePublish(opts *pubOpts) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (ctx ContextOpt) configureJSContext(opts *js) error {
|
||||
opts.ctx = ctx
|
||||
return nil
|
||||
}
|
||||
|
||||
// Context returns an option that can be used to configure a context.
|
||||
func Context(ctx context.Context) ContextOpt {
|
||||
return ContextOpt{ctx}
|
||||
|
||||
Reference in New Issue
Block a user