Skip to content

Latest commit

 

History

History
61 lines (31 loc) · 1.22 KB

channels.rst

File metadata and controls

61 lines (31 loc) · 1.22 KB

Channels

In order to instantiate a ZeebeWorker or ZeebeClient you will need to provide an instance of a grpc.aio.Channel.

Pyzeebe provides a couple standard ways to achieve this:

Insecure

Create a grpc channel connected to a Zeebe Gateway with tls disabled

.. autofunction:: pyzeebe.create_insecure_channel


Example:

from pyzeebe import create_insecure_channel

channel = create_insecure_channel(hostname="zeebe", port=443)

Secure

Create a grpc channel with a secure connection to a Zeebe Gateway with tls

.. autofunction:: pyzeebe.create_secure_channel

Example:

import grpc
from pyzeebe import create_secure_channel


grpc.ssl_channel_credentials(root_certificates="<root_certificate>", private_key="<private_key>")
channel = create_secure_channel(channel_credentials=credentials)

Camunda Cloud

Create a grpc channel connected to a Zeebe Gateway running in camunda cloud

.. autofunction:: pyzeebe.create_camunda_cloud_channel

Example:

from pyzeebe import create_camunda_cloud_channel


channel = create_camunda_cloud_channel("client_id", "client_secret", "cluster_id")