MCPcopy
hub / github.com/lxc/incus / CreateNode

Method CreateNode

internal/server/db/node.go:606–613  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
606func (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.

Calls 2

CreateNodeWithArchMethod · 0.95
ArchitectureGetLocalIDFunction · 0.92