Method: Corosync::Quorum#connect
- Defined in:
- lib/corosync/quorum.rb
#connect(start = false) ⇒ void
This method returns an undefined value.
Connect to the Quorum service
45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/corosync/quorum.rb', line 45 def connect(start = false) handle_ptr = FFI::MemoryPointer.new(Corosync.find_type(:quorum_handle_t)) quorum_type_ptr = FFI::MemoryPointer.new(:uint32) Corosync.cs_send(:quorum_initialize, handle_ptr, @callbacks, quorum_type_ptr) @handle = handle_ptr.read_uint64 fd_ptr = FFI::MemoryPointer.new(:int) Corosync.cs_send(:quorum_fd_get, @handle, fd_ptr) @fd = IO.new(fd_ptr.read_int) self.start if start end |