CreateNode adds a node to the current list of members that are part of the cluster. The node's architecture will be the architecture of the machine the method is being run on. It returns the ID of the newly inserted row.
(name string, address string)
| 604 | // cluster. The node's architecture will be the architecture of the machine the |
| 605 | // method is being run on. It returns the ID of the newly inserted row. |
| 606 | func (c *ClusterTx) CreateNode(name string, address string) (int64, error) { |
| 607 | arch, err := osarch.ArchitectureGetLocalID() |
| 608 | if err != nil { |
| 609 | return -1, err |
| 610 | } |
| 611 | |
| 612 | return c.CreateNodeWithArch(name, address, arch) |
| 613 | } |
| 614 | |
| 615 | // CreateNodeWithArch is the same as NodeAdd, but lets setting the node |
| 616 | // architecture explicitly. |