Skip to content

Commit e309eaf

Browse files
docs: add reading lag field comment (#2451)
Signed-off-by: monkey92t <golang@88.com> Co-authored-by: Vladimir Mihailenco <vladimir.webdev@gmail.com>
1 parent 6ec4585 commit e309eaf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

command.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2057,6 +2057,9 @@ func (cmd *XInfoGroupsCmd) readReply(rd *proto.Reader) error {
20572057
}
20582058
case "lag":
20592059
group.Lag, err = rd.ReadInt()
2060+
2061+
// lag: the number of entries in the stream that are still waiting to be delivered
2062+
// to the group's consumers, or a NULL(Nil) when that number can't be determined.
20602063
if err != nil && err != Nil {
20612064
return err
20622065
}
@@ -2366,6 +2369,8 @@ func readStreamGroups(rd *proto.Reader) ([]XInfoStreamGroup, error) {
23662369
return nil, err
23672370
}
23682371
case "lag":
2372+
// lag: the number of entries in the stream that are still waiting to be delivered
2373+
// to the group's consumers, or a NULL(Nil) when that number can't be determined.
23692374
group.Lag, err = rd.ReadInt()
23702375
if err != nil && err != Nil {
23712376
return nil, err

0 commit comments

Comments
 (0)