pgraph: Replace edge struct with interface

This further cleans up the pgraph lib to be more generic.
This commit is contained in:
James Shubin
2017-05-28 19:51:56 -04:00
parent a87288d519
commit 4150ae7307
12 changed files with 247 additions and 173 deletions

View File

@@ -247,8 +247,10 @@ func (c *GraphConfig) NewGraphFromConfig(hostname string, world resources.World,
}
from := lookup[strings.ToLower(e.From.Kind)][e.From.Name]
to := lookup[strings.ToLower(e.To.Kind)][e.To.Name]
edge := pgraph.NewEdge(e.Name)
edge.Notify = e.Notify
edge := &resources.Edge{
Name: e.Name,
Notify: e.Notify,
}
graph.AddEdge(from, to, edge)
}