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

Function deleteShard

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

Source from the content-addressed store, hash-verified

146}
147
148func deleteShard(client *client, options *DeleteOptions) error {
149 rsp, err := client.restyCli.R().
150 SetPathParam("namespace", options.namespace).
151 SetPathParam("cluster", options.cluster).
152 SetPathParam("shard", strconv.Itoa(options.shard)).
153 Delete("/namespaces/{namespace}/clusters/{cluster}/shards/{shard}")
154 if err != nil {
155 return err
156 }
157 if rsp.IsError() {
158 return unmarshalError(rsp.Body())
159 }
160 printLine("delete shard %d successfully.", options.shard)
161 return nil
162}
163
164func deleteNode(client *client, options *DeleteOptions, nodeID string) error {
165 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