(c *gin.Context)
| 138 | } |
| 139 | |
| 140 | func RequiredRaftEngine(c *gin.Context) { |
| 141 | storage, _ := c.MustGet(consts.ContextKeyStore).(*store.ClusterStore) |
| 142 | raftNode, ok := storage.GetEngine().(*raft.Node) |
| 143 | if !ok { |
| 144 | helper.ResponseBadRequest(c, errors.New("raft engine is not enabled")) |
| 145 | c.Abort() |
| 146 | return |
| 147 | } |
| 148 | c.Set(consts.ContextKeyRaftNode, raftNode) |
| 149 | c.Next() |
| 150 | } |
nothing calls this directly
no test coverage detected