lxd/cluster/membership.go
func Enabled(node *db.Node) (bool, error) {
	enabled := false
	err := node.Transaction(func(tx *db.NodeTx) error {
		addresses, err := tx.RaftNodeAddresses()
		if err != nil {
			return err
		}
		enabled = len(addresses) > 0
		return nil
	})
	return enabled, err
}
func Enabled(node *db.Node) (bool, error) {
	enabled := false
	err := node.Transaction(func(tx *db.NodeTx) error {
		addresses, err := tx.RaftNodeAddresses()
		if err != nil {
			return err
		}
		enabled = len(addresses) > 0
		return nil
	})
	return enabled, err
}
func Enabled ( node * db . Node ) ( bool , error ) { enabled := false err := node . Transaction ( func ( tx * db . NodeTx ) error { addresses , err := tx . RaftNodeAddresses ( ) if err != nil { return err } enabled = len ( addresses ) > 0 return nil } ) return enabled , err }
// Enabled is a convenience that returns true if clustering is enabled on this
// node.
Enabled is a convenience that returns true if clustering is enabled on this node .