瀏覽代碼

raft: return *Node

Blake Mizerany 11 年之前
父節點
當前提交
9545662c6b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      raft/node.go

+ 1 - 1
raft/node.go

@@ -11,7 +11,7 @@ type Node struct {
 	sm *stateMachine
 	sm *stateMachine
 }
 }
 
 
-func New(k, addr int, next Interface) Interface {
+func New(k, addr int, next Interface) *Node {
 	n := &Node{
 	n := &Node{
 		sm: newStateMachine(k, addr, next),
 		sm: newStateMachine(k, addr, next),
 	}
 	}