Load a new graph into the engine. Offline graph operations will be performed on this graph. To switch it to the active graph, and run it, use Commit.
(newGraph *pgraph.Graph)
| 170 | // Load a new graph into the engine. Offline graph operations will be performed |
| 171 | // on this graph. To switch it to the active graph, and run it, use Commit. |
| 172 | func (obj *Engine) Load(newGraph *pgraph.Graph) error { |
| 173 | if obj.nextGraph != nil { |
| 174 | return fmt.Errorf("can't overwrite pending graph, use abort") |
| 175 | } |
| 176 | obj.nextGraph = newGraph |
| 177 | return nil |
| 178 | } |
| 179 | |
| 180 | // Abort the pending graph and any work in progress on it. After this call you |
| 181 | // may Load a new graph. |
no outgoing calls