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

Function NewLocalCluster

dgraphtest/local_cluster.go:92–99  ·  view source on GitHub ↗

NewLocalCluster creates a new local dgraph cluster with given configuration

(conf ClusterConfig)

Source from the content-addressed store, hash-verified

90
91// NewLocalCluster creates a new local dgraph cluster with given configuration
92func 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.
102func (c *LocalCluster) init() error {

Callers 15

TestCheckUpgradeFunction · 0.92
TestQueryDuplicateNodesFunction · 0.92
setupBulkClusterFunction · 0.92
setupTargetClusterFunction · 0.92
TestMCPSSEFunction · 0.92
TestMainFunction · 0.92
TestShortestPathFunction · 0.92
SetupSubTestMethod · 0.92

Calls 2

initMethod · 0.95
CleanupMethod · 0.95

Tested by 15

TestCheckUpgradeFunction · 0.74
TestQueryDuplicateNodesFunction · 0.74
setupBulkClusterFunction · 0.74
setupTargetClusterFunction · 0.74
TestMCPSSEFunction · 0.74
TestMainFunction · 0.74
TestShortestPathFunction · 0.74
SetupSubTestMethod · 0.74