gapi: Add world interface and refactor existing code to use it

This is the initial base of what will hopefully become a powerful API
that machines will use to communicate. It will be the basis of the
stateful data store that can be used for exported resources, fact
exchange, state machine flags, locks, and much more.
This commit is contained in:
James Shubin
2016-12-07 02:39:14 -05:00
parent eb545e75fb
commit 0e316b1d55
9 changed files with 75 additions and 19 deletions

View File

@@ -81,7 +81,7 @@ func (obj *MyGAPI) Graph() (*pgraph.Graph, error) {
Comment: "comment!",
}
g, err := gc.NewGraphFromConfig(obj.data.Hostname, obj.data.EmbdEtcd, obj.data.Noop)
g, err := gc.NewGraphFromConfig(obj.data.Hostname, obj.data.World, obj.data.Noop)
return g, err
}

View File

@@ -74,7 +74,7 @@ func (obj *MyGAPI) Graph() (*pgraph.Graph, error) {
vertex = v // save
}
//g, err := config.NewGraphFromConfig(obj.data.Hostname, obj.data.EmbdEtcd, obj.data.Noop)
//g, err := config.NewGraphFromConfig(obj.data.Hostname, obj.data.World, obj.data.Noop)
return g, nil
}

View File

@@ -116,7 +116,7 @@ func (obj *MyGAPI) Graph() (*pgraph.Graph, error) {
e2.Notify = true // send a notification from v2 to v3
g.AddEdge(v2, v3, e2)
//g, err := config.NewGraphFromConfig(obj.data.Hostname, obj.data.EmbdEtcd, obj.data.Noop)
//g, err := config.NewGraphFromConfig(obj.data.Hostname, obj.data.World, obj.data.Noop)
return g, nil
}