MCPcopy Create free account
hub / github.com/apache/kvrocks-controller / List

Method List

server/api/cluster.go:60–68  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

58}
59
60func (handler *ClusterHandler) List(c *gin.Context) {
61 namespace := c.Param("namespace")
62 clusters, err := handler.s.ListCluster(c, namespace)
63 if err != nil && !errors.Is(err, consts.ErrNotFound) {
64 helper.ResponseError(c, err)
65 return
66 }
67 helper.ResponseOK(c, gin.H{"clusters": clusters})
68}
69
70func (handler *ClusterHandler) Get(c *gin.Context) {
71 cluster, _ := c.MustGet(consts.ContextKeyCluster).(*store.Cluster)

Callers 1

TestClusterBasicsFunction · 0.95

Calls 3

ResponseErrorFunction · 0.92
ResponseOKFunction · 0.92
ListClusterMethod · 0.65

Tested by 1

TestClusterBasicsFunction · 0.76