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

Method GetNodes

internal/server/db/node.go:407–409  ·  view source on GitHub ↗

GetNodes returns all cluster members that are part of the cluster. If this server is not clustered, a list with a single member whose address is 0.0.0.0 is returned.

(ctx context.Context)

Source from the content-addressed store, hash-verified

405//
406// If this server is not clustered, a list with a single member whose address is 0.0.0.0 is returned.
407func (c *ClusterTx) GetNodes(ctx context.Context) ([]NodeInfo, error) {
408 return c.nodes(ctx, false /* not pending */, "")
409}
410
411// GetNodesCount returns the number of members in the cluster.
412//

Callers 15

GetStorageVolumeURIsMethod · 0.95
NetworkNodeConfigsMethod · 0.95
InstancePlacementRunFunction · 0.80
addChassisGroupEntryMethod · 0.80
chassisEnabledMethod · 0.80
TestNodeAddFunction · 0.80
TestSetNodePendingFlagFunction · 0.80
TestSetNodeHeartbeatFunction · 0.80
TestGetCandidateMembersFunction · 0.80

Calls 1

nodesMethod · 0.95

Tested by 14

TestNodeAddFunction · 0.64
TestSetNodePendingFlagFunction · 0.64
TestSetNodeHeartbeatFunction · 0.64
TestGetCandidateMembersFunction · 0.64
TestBootstrapFunction · 0.64
TestJoinFunction · 0.64
TestHeartbeatFunction · 0.64