Skip to content

Commit

Permalink
refactor: Private newFSM function name because of linting complains
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Castell committed Oct 9, 2019
1 parent fa84bb7 commit 9e3fc75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dkron/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ func (a *Agent) setupRaft() error {
if err != nil {
return fmt.Errorf("recovery failed to parse peers.json: %v", err)
}
tmpFsm := NewFSM(nil)
tmpFsm := newFSM(nil)
if err := raft.RecoverCluster(config, tmpFsm,
logStore, stableStore, snapshots, transport, configuration); err != nil {
return fmt.Errorf("recovery failed: %v", err)
Expand Down Expand Up @@ -329,7 +329,7 @@ func (a *Agent) setupRaft() error {

// Instantiate the Raft systems. The second parameter is a finite state machine
// which stores the actual kv pairs and is operated upon through Apply().
fsm := NewFSM(a.Store)
fsm := newFSM(a.Store)
rft, err := raft.NewRaft(config, fsm, logStore, stableStore, snapshots, transport)
if err != nil {
return fmt.Errorf("new raft: %s", err)
Expand Down
2 changes: 1 addition & 1 deletion dkron/fsm.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type dkronFSM struct {
}

// NewFSM is used to construct a new FSM with a blank state
func NewFSM(store Storage) *dkronFSM {
func newFSM(store Storage) *dkronFSM {
return &dkronFSM{
store: store,
}
Expand Down

0 comments on commit 9e3fc75

Please sign in to comment.