NewLocalCluster creates a new local dgraph cluster with given configuration
(conf ClusterConfig)
| 90 | |
| 91 | // NewLocalCluster creates a new local dgraph cluster with given configuration |
| 92 | func NewLocalCluster(conf ClusterConfig) (*LocalCluster, error) { |
| 93 | c := &LocalCluster{conf: conf} |
| 94 | if err := c.init(); err != nil { |
| 95 | c.Cleanup(true) |
| 96 | return nil, err |
| 97 | } |
| 98 | return c, nil |
| 99 | } |
| 100 | |
| 101 | // init performs the one time setup and sets up the cluster. |
| 102 | func (c *LocalCluster) init() error { |