MCPcopy
hub / github.com/dgraph-io/dgraph / createVolume

Method createVolume

dgraphtest/local_cluster.go:226–235  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

224}
225
226func (c *LocalCluster) createVolume(name string) error {
227 ctx, cancel := context.WithTimeout(context.Background(), requestTimeout)
228 defer cancel()
229
230 req := volume.CreateOptions{Driver: "local", Name: name}
231 if _, err := c.dcli.VolumeCreate(ctx, req); err != nil {
232 return errors.Wrapf(err, "error creating volume [%v]", name)
233 }
234 return nil
235}
236
237func (c *LocalCluster) setupBeforeCluster() error {
238 if err := c.setupBinary(); err != nil {

Callers 1

initMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected