How to use the patroni.dcs.Member.from_node function in patroni

To help you get started, we’ve selected a few patroni examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zalando / patroni / patroni / dcs / kubernetes.py View on Github external
def member(pod):
        annotations = pod.metadata.annotations or {}
        member = Member.from_node(pod.metadata.resource_version, pod.metadata.name, None, annotations.get('status', ''))
        member.data['pod_labels'] = pod.metadata.labels
        return member
github zalando / patroni / patroni / dcs / etcd3.py View on Github external
def member(node):
        return Member.from_node(node['mod_revision'], os.path.basename(node['key']), node['lease'], node['value'])
github zalando / patroni / patroni / dcs / zookeeper.py View on Github external
def member(name, value, znode):
        return Member.from_node(znode.version, name, znode.ephemeralOwner, value)
github zalando / patroni / patroni / dcs / raft.py View on Github external
def member(key, value):
        return Member.from_node(value['index'], os.path.basename(key), None, value['value'])