Please consider this go snippet: https://play.golang.org/p/JkMIRwshG5U
My Service
struct holds:
type Service struct {
ServiceName string
NodeCount int
HeadNode Node
Health bool
}
and my Node struct has:
type Node struct {
NodeName string
LastHeard int
Role bool
Health bool
}
Suppose if I've 3 nodes for my Service; I'd like the Service
struct to also have/keep a list of Nodes. Or, a slice of structs since this is Go, and how do I represent this in Service
struct? (Sorry if this question still comes across ambiguous!)