Skip to content

Commit

Permalink
ci skip: Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
flowerinthenight authored Sep 22, 2024
1 parent 9c1bdfa commit 11f364e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,13 @@ $ ./zig-out/bin/zgroup group1 0.0.0.0:8083
# and so on...
```

The implementation is still a work-in-progress at this point, especially the infection-style member/state info dissemination, as well as the API to get the latest members in the cluster.
To get the current members of the group, you can try something like:

```zig
const members = try fleet.memberNames(gpa.allocator());
defer members.deinit();
for (members.items, 0..) |v, i| {
defer gpa.allocator().free(v);
log.info("(from main) member[{d}]: {s}", .{ i, v });
}
```

0 comments on commit 11f364e

Please sign in to comment.