File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/beacons/__pycache__/proxy_example.cpython-310.pyc
Back
o ;j� � @ sL d Z ddlZddlZddlZdgZdZe�e�Z dd� Z dd� Zd d � ZdS )zy Example beacon to use with salt-proxy .. code-block:: yaml beacons: proxy_example: endpoint: beacon � N�*Z proxy_examplec C s dS )z� Trivially let the beacon load for the test example. For a production beacon we should probably have some expression here. T� r r r �N/opt/saltstack/salt/lib/python3.10/site-packages/salt/beacons/proxy_example.py�__virtual__ s r c C s t | t�sdS dS )z+ Validate the beacon configuration )Fz6Configuration for proxy_example beacon must be a list.)TzValid beacon configuration)� isinstance�list)�configr r r �validate! s r c C sD t jj�| �} d�td d | d �}t jjj|ddd�}|d gS ) z� Called several times each second https://docs.saltproject.io/en/latest/topics/beacons/#the-beacon-function .. code-block:: yaml beacons: proxy_example: - endpoint: beacon z{}{}�proxy�urlZendpoint�jsonT)Zdecode_type�decode�dict)�salt�utilsZbeaconsZlist_to_dict�formatZ__opts__�http�query)r Z beacon_url�retr r r �beacon* s r ) �__doc__�loggingZsalt.utils.beaconsr Zsalt.utils.httpZ__proxyenabled__Z__virtualname__� getLogger�__name__�logr r r r r r r �<module> s
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings