Coordinate distributed systems.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

19 lines
384 B

import uuid
import six
from tooz import coordination
coordinator = coordination.get_coordinator('kazoo://localhost', b'host-1')
coordinator.start()
# Create a group
group = six.binary_type(six.text_type(uuid.uuid4()).encode('ascii'))
request = coordinator.create_group(group)
request.get()
# Join a group
request = coordinator.join_group(group)
request.get()
coordinator.stop()