File: //var/opt/nydus/ops/mysql/opentelemetry/context/__pycache__/context.cpython-39.pyc
a
�,�ha � @ sL d dl Z d dlmZmZ G dd� de jeef �ZG dd� de�ZdgZ dS )� N)�ABC�abstractmethodc @ s e Zd Zeedd�dd�ZdS )�ContextN)�key�value�returnc C s t �d S )N)�
ValueError)�selfr r � r
�V/opt/nydus/tmp/pip-target-wkfpz8uv/lib64/python/mysql/opentelemetry/context/context.py�__setitem__ s zContext.__setitem__)�__name__�
__module__�__qualname__�str�objectr r
r
r
r r s r c @ sJ e Zd ZdZeeed�dd��Zeed�dd��Zeedd �d
d��Z dS )�_RuntimeContextz�The RuntimeContext interface provides a wrapper for the different
mechanisms that are used to propagate context in Python.
Implementations can be made available via entry_points and
selected through environment variables.
)�contextr c C s dS )z�Sets the current `Context` object. Returns a
token that can be used to reset to the previous `Context`.
Args:
context: The Context to set.
Nr
)r r r
r
r �attach s z_RuntimeContext.attach)r c C s dS )z%Returns the current `Context` object.Nr
)r r
r
r �get_current) s z_RuntimeContext.get_currentN)�tokenr c C s dS )zpResets Context to a previous value
Args:
token: A reference to a previous Context.
Nr
)r r r
r
r �detach- s z_RuntimeContext.detach)
r
r r �__doc__r r r r r r r
r
r
r r s r )
�typing�abcr r �Dictr r r r �__all__r
r
r
r �<module> s