NewVertex is the constructor function for the Vertex
(key string, service string, initialStatus ServiceStatus)
| 287 | |
| 288 | // NewVertex is the constructor function for the Vertex |
| 289 | func NewVertex(key string, service string, initialStatus ServiceStatus) *Vertex { |
| 290 | return &Vertex{ |
| 291 | Key: key, |
| 292 | Service: service, |
| 293 | Status: initialStatus, |
| 294 | Parents: map[string]*Vertex{}, |
| 295 | Children: map[string]*Vertex{}, |
| 296 | } |
| 297 | } |
| 298 | |
| 299 | // AddVertex adds a vertex to the Graph |
| 300 | func (g *Graph) AddVertex(key string, service string, initialStatus ServiceStatus) { |