Skip to content

Commit

Permalink
rename fn
Browse files Browse the repository at this point in the history
  • Loading branch information
travisjeffery committed Jan 24, 2017
1 parent 42ca154 commit b1fe2ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions broker/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ func (s *Broker) Partition(topic string, partition int32) (*jocko.Partition, err
}

func (s *Broker) AddPartition(partition *jocko.Partition) error {
return s.apply(addPartition, partition)
return s.raftApply(addPartition, partition)
}

func (s *Broker) AddBroker(broker jocko.BrokerConn) error {
return s.apply(addBroker, broker)
return s.raftApply(addBroker, broker)
}

func (s *Broker) BrokerConn(id int32) *jocko.BrokerConn {
Expand Down Expand Up @@ -278,7 +278,7 @@ func (s *Broker) DeleteTopics(topics ...string) error {
}

func (s *Broker) DeleteTopic(topic string) error {
return s.apply(deleteTopic, &jocko.Partition{Topic: topic})
return s.raftApply(deleteTopic, &jocko.Partition{Topic: topic})
}

func (s *Broker) deleteTopic(tp *jocko.Partition) error {
Expand Down
2 changes: 1 addition & 1 deletion broker/raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (b *Broker) setupRaft() (err error) {
return nil
}

func (s *Broker) apply(cmdType CmdType, data interface{}) error {
func (s *Broker) raftApply(cmdType CmdType, data interface{}) error {
c, err := newCommand(cmdType, data)
if err != nil {
return err
Expand Down

0 comments on commit b1fe2ec

Please sign in to comment.