remove commented codes
parent
9dc51d0412
commit
6821747763
15
command.go
15
command.go
|
@ -64,21 +64,6 @@ func (c *GetCommand) Apply(server *raft.Server) (interface{}, error) {
|
||||||
return etcdStore.Get(c.Key)
|
return etcdStore.Get(c.Key)
|
||||||
}
|
}
|
||||||
|
|
||||||
// List command
|
|
||||||
// type ListCommand struct {
|
|
||||||
// Prefix string `json:"prefix"`
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // The name of the list command in the log
|
|
||||||
// func (c *ListCommand) CommandName() string {
|
|
||||||
// return "list"
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // List all the keys have the given prefix path
|
|
||||||
// func (c *ListCommand) Apply(server *raft.Server) (interface{}, error) {
|
|
||||||
// return etcdStore.Get(c.Prefix)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Delete command
|
// Delete command
|
||||||
type DeleteCommand struct {
|
type DeleteCommand struct {
|
||||||
Key string `json:"key"`
|
Key string `json:"key"`
|
||||||
|
|
1
etcd.go
1
etcd.go
|
@ -581,6 +581,5 @@ func registerCommands() {
|
||||||
raft.RegisterCommand(&GetCommand{})
|
raft.RegisterCommand(&GetCommand{})
|
||||||
raft.RegisterCommand(&DeleteCommand{})
|
raft.RegisterCommand(&DeleteCommand{})
|
||||||
raft.RegisterCommand(&WatchCommand{})
|
raft.RegisterCommand(&WatchCommand{})
|
||||||
//raft.RegisterCommand(&ListCommand{})
|
|
||||||
raft.RegisterCommand(&TestAndSetCommand{})
|
raft.RegisterCommand(&TestAndSetCommand{})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue