
    uYf                     $    d dl Z d dlmZ d Zd Zy)    N)PROPAGATION_KEY_BASE_64c                     t         j                  j                  rPt         j                  j                  }|j                   |t                     |j                  d| z   d|z   ddg      S y)ay  
    :param typ: The type of the checkpoint, usually the streaming technology being used.
        Examples include kafka, kinesis, sns etc. (str)
    :param source: The source of data. This can be a topic, exchange or stream name. (str)
    :param carrier_get: A function used to extract context from the carrier (function (str) -> str)

    :returns DataStreamsCtx | None
    type:topic:zdirection:inmanual_checkpoint:trueN)ddtraceconfig_data_streams_enabledtracerdata_streams_processordecode_pathway_b64r   set_checkpoint)typsourcecarrier_get	processors       T/var/www/highfloat_scraper/venv/lib/python3.12/site-packages/ddtrace/data_streams.pyset_consume_checkpointr      s]     ~~++NN99	$$[1H%IJ''368I>[s(tuu ,    c                     t         j                  j                  rRt         j                  j                  j                  d| z   d|z   ddg      }| |t        |j                                |S y)a  
    :param typ: The type of the checkpoint, usually the streaming technology being used. Examples include
        kafka, kinesis, sns etc. (str)
    :param target: The destination to which the data is being sent. For instance: topic, exchange or
        stream name. (str)
    :param carrier_set: A function used to inject the context into the carrier (function (str, str) -> None)

    :returns DataStreamsCtx | None
    r   r   zdirection:outr   N)r   r	   r
   r   r   r   r   
encode_b64)r   targetcarrier_setpathways       r   set_produce_checkpointr      sg     ~~++..77FFs]Hv-@XY
 /1C1C1EF ,r   )r   &ddtrace.internal.datastreams.processorr   r   r    r   r   <module>r      s     Jvr   