MgmtOperationAsync Class
An asynchronous AMQP request/response operation. These are frequently used for management tasks against a $management node, however any node name can be specified and the available options will depend on the target service.
- Inheritance
-
MgmtOperationAsync
Constructor
MgmtOperationAsync(session, target=None, debug=False, status_code_field=b'statusCode', description_fields=b'statusDescription', encoding='UTF-8', loop=None)
Parameters
- session
- SessionAsync
The AMQP session to use for the operation. New send and receive links will be created in this Session.
The AMQP node to send the request to. The default is b"$management"
Provide an alternate name for the status code in the response body which can vary between services due to the spec still being in draft. The default is b"statusCode".
Provide an alternate name for the description in the response body which can vary between services due to the spec still being in draft. The default is b"statusDescription".
- encoding
- str
The encoding to use for parameters supplied as strings. Default is 'UTF-8'
- encoding
- loop
Methods
| destroy_async |
Close the send/receive links for this node asynchronously. |
| execute_async |
Execute a request and wait on a response asynchronously. |
destroy_async
Close the send/receive links for this node asynchronously.
async destroy_async()
execute_async
Execute a request and wait on a response asynchronously.
async execute_async(operation, op_type, message, timeout=0)
Parameters
- operation
- bytes
The type of operation to be performed. This value will be service-specific, but common values include READ, CREATE and UPDATE. This value will be added as an application property on the message.
- op_type
- bytes
The type on which to carry out the operation. This will be specific to the entities of the service. This value will be added as an application property on the message.
- timeout
- float
Provide an optional timeout in milliseconds within which a response to the management request must be received.
Return type
Attributes
loop
Feedback
Submit and view feedback for