Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
eapache committed Aug 4, 2015
1 parent bcfa33e commit 380c6b0
Show file tree
Hide file tree
Showing 3 changed files with 436 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ type Config struct {
// If enabled, any errors that occured while consuming are returned on the Errors channel (default disabled).
Errors bool
}

// TODO these need documentation, defaults, and validation
Offsets struct {
CommitInterval time.Duration
}
}

// A user-provided string sent with every request to the brokers for logging, debugging, and auditing purposes.
Expand Down
12 changes: 12 additions & 0 deletions offset_fetch_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,15 @@ func (r *OffsetFetchResponse) decode(pd packetDecoder) (err error) {

return nil
}

func (r *OffsetFetchResponse) GetBlock(topic string, partition int32) *OffsetFetchResponseBlock {
if r.Blocks == nil {
return nil
}

if r.Blocks[topic] == nil {
return nil
}

return r.Blocks[topic][partition]
}
Loading

0 comments on commit 380c6b0

Please sign in to comment.