Skip to content

Commit

Permalink
Revised signature.
Browse files Browse the repository at this point in the history
Oliver, Jonathan committed Jun 4, 2014
1 parent d00bd4d commit da7d0eb
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 5 additions & 1 deletion example/main.go
Original file line number Diff line number Diff line change
@@ -20,7 +20,11 @@ var ring = [BufferSize]int64{}
func main() {
runtime.GOMAXPROCS(2)

controller := disruptor.Configure(BufferSize, SampleConsumer{}).Build()
controller := disruptor.
Configure(BufferSize).
WithConsumerGroup(SampleConsumer{}).
Build()

controller.Start()

started := time.Now()
6 changes: 2 additions & 4 deletions wireup.go
Original file line number Diff line number Diff line change
@@ -10,14 +10,12 @@ type (
}
)

func Configure(capacity int64, consumers ...Consumer) Wireup {
this := Wireup{
func Configure(capacity int64) Wireup {
return Wireup{
capacity: capacity,
groups: [][]Consumer{},
cursors: []*Cursor{NewCursor()},
}

return this.WithConsumerGroup(consumers...)
}

func (this Wireup) WithConsumerGroup(consumers ...Consumer) Wireup {

0 comments on commit da7d0eb

Please sign in to comment.