Skip to content

Commit

Permalink
return UserMetadata
Browse files Browse the repository at this point in the history
octu0 committed Oct 29, 2024
1 parent 9891f37 commit 07f58eb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bully.go
Original file line number Diff line number Diff line change
@@ -215,6 +215,13 @@ func (b *Bully) IsLeader() bool {
return b.node.IsLeader()
}

func (b *Bully) Metadata() []byte {
b.mu.RLock()
defer b.mu.RUnlock()

return b.node.UserMetadata()
}

func (b *Bully) UpdateMetadata(data []byte) error {
b.mu.RLock()
defer b.mu.RUnlock()

0 comments on commit 07f58eb

Please sign in to comment.