(client *client, options *DeleteOptions)
| 146 | } |
| 147 | |
| 148 | func 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 | |
| 164 | func deleteNode(client *client, options *DeleteOptions, nodeID string) error { |
| 165 | rsp, err := client.restyCli.R(). |
no test coverage detected