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

Function createNamespace

cmd/client/command/create.go:122–135  ·  view source on GitHub ↗
(cli *client, name string)

Source from the content-addressed store, hash-verified

120}
121
122func createNamespace(cli *client, name string) error {
123 rsp, err := cli.restyCli.R().
124 SetBody(map[string]string{"namespace": name}).
125 Post("/namespaces")
126 if err != nil {
127 return err
128 }
129
130 if rsp.IsError() {
131 return unmarshalError(rsp.Body())
132 }
133 printLine("create namespace: %s successfully.", name)
134 return nil
135}
136
137func createCluster(cli *client, options *CreateOptions) error {
138 rsp, err := cli.restyCli.R().

Callers 1

create.goFile · 0.70

Calls 2

unmarshalErrorFunction · 0.85
printLineFunction · 0.85

Tested by

no test coverage detected