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

Function deleteCluster

cmd/client/command/delete.go:132–146  ·  view source on GitHub ↗
(client *client, options *DeleteOptions)

Source from the content-addressed store, hash-verified

130}
131
132func deleteCluster(client *client, options *DeleteOptions) error {
133 rsp, err := client.restyCli.R().
134 SetPathParams(map[string]string{
135 "namespace": options.namespace,
136 "cluster": options.cluster,
137 }).Delete("/namespaces/{namespace}/clusters/{cluster}")
138 if err != nil {
139 return err
140 }
141 if rsp.IsError() {
142 return unmarshalError(rsp.Body())
143 }
144 printLine("delete cluster: %s successfully.", options.cluster)
145 return nil
146}
147
148func deleteShard(client *client, options *DeleteOptions) error {
149 rsp, err := client.restyCli.R().

Callers 1

delete.goFile · 0.70

Calls 3

unmarshalErrorFunction · 0.85
printLineFunction · 0.85
DeleteMethod · 0.65

Tested by

no test coverage detected