NewOffsetManagerFromClient creates a new OffsetManager from the given client. It is still necessary to call Close() on the underlying client when finished with the partition manager.
(group string, client Client)
| 51 | // NewOffsetManagerFromClient creates a new OffsetManager from the given client. |
| 52 | // It is still necessary to call Close() on the underlying client when finished with the partition manager. |
| 53 | func NewOffsetManagerFromClient(group string, client Client) (OffsetManager, error) { |
| 54 | return newOffsetManagerFromClient(group, "", GroupGenerationUndefined, client, nil) |
| 55 | } |
| 56 | |
| 57 | func newOffsetManagerFromClient(group, memberID string, generation int32, client Client, sessionCanceler context.CancelCauseFunc) (*offsetManager, error) { |
| 58 | // Check that we are not dealing with a closed Client before processing any other arguments |