Node represents a node in the network
| 17 | |
| 18 | // Node represents a node in the network |
| 19 | type Node struct { |
| 20 | ID string `json:"id"` |
| 21 | Name string `json:"name"` |
| 22 | IPAddress string `json:"ip_address"` |
| 23 | Port int `json:"port"` |
| 24 | CreatedAt time.Time `json:"created_at"` |
| 25 | UpdatedAt time.Time `json:"updated_at"` |
| 26 | |
| 27 | mu sync.RWMutex |
| 28 | } |
| 29 | |
| 30 | // NewNode creates a new node |
| 31 | func NewNode(id, name, ipAddress string, port int) *Node { |
nothing calls this directly
no outgoing calls
no test coverage detected