DirectGet is an option that can be used to make GetMsg() or GetLastMsg() retrieve message directly from a group of servers (leader and replicas) if the stream was created with the AllowDirect option.
()
| 413 | // retrieve message directly from a group of servers (leader and replicas) |
| 414 | // if the stream was created with the AllowDirect option. |
| 415 | func DirectGet() JSOpt { |
| 416 | return jsOptFn(func(js *jsOpts) error { |
| 417 | js.directGet = true |
| 418 | return nil |
| 419 | }) |
| 420 | } |
| 421 | |
| 422 | // DirectGetNext is an option that can be used to make GetMsg() retrieve message |
| 423 | // directly from a group of servers (leader and replicas) if the stream was |