AddVertex adds a vertex to the Graph
(key string, service string, initialStatus ServiceStatus)
| 298 | |
| 299 | // AddVertex adds a vertex to the Graph |
| 300 | func (g *Graph) AddVertex(key string, service string, initialStatus ServiceStatus) { |
| 301 | g.lock.Lock() |
| 302 | defer g.lock.Unlock() |
| 303 | |
| 304 | v := NewVertex(key, service, initialStatus) |
| 305 | g.Vertices[key] = v |
| 306 | } |
| 307 | |
| 308 | // AddEdge adds a relationship of dependency between vertices `source` and `destination` |
| 309 | func (g *Graph) AddEdge(source string, destination string) error { |