Skip to content

Commit

Permalink
Add a getter for replica ID
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoriano committed Oct 25, 2018
1 parent 9dd879a commit 1900f52
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions offset_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ func (r *OffsetRequest) SetReplicaID(id int32) {
r.replicaID = &r.storeReplicaID
}

func (r *OffsetRequest) ReplicaID() int32 {
if r.replicaID == nil {
return -1
}
return r.storeReplicaID
}

func (r *OffsetRequest) AddBlock(topic string, partitionID int32, time int64, maxOffsets int32) {
if r.blocks == nil {
r.blocks = make(map[string]map[int32]*offsetRequestBlock)
Expand Down

0 comments on commit 1900f52

Please sign in to comment.