github.com/asynkron/protoactor-go@v0.0.0-20240308120642-ef91a6abee75/cluster/clusterproviders/automanaged/node_model.go (about) 1 package automanaged 2 3 // NodeModel represents a node in the cluster 4 type NodeModel struct { 5 ID string `json:"id"` 6 Address string `json:"address"` 7 AutoManagePort int `json:"auto_manage_port"` 8 Port int `json:"port"` 9 Kinds []string `json:"kinds"` 10 ClusterName string `json:"cluster_name"` 11 } 12 13 // NewNode returns a new node for the cluster 14 func NewNode(clusterName string, id string, address string, port int, autoManPort int, kind []string) *NodeModel { 15 return &NodeModel{ 16 ID: id, 17 ClusterName: clusterName, 18 Address: address, 19 Port: port, 20 AutoManagePort: autoManPort, 21 Kinds: kind, 22 } 23 }