-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add connection support; restructured tests to fail on RUST AMQP rathe…
…r than attempting to run; removed some uAMQP-only features (#5986) * Checkpoint of connection logic * Started implementing Rust based Connection by pulling out uAMQP artifacts * Implemented AMQP Connection in Rust; started API surface refactoring for Rust APIs; Refactored tests to remove some uAMQP only elements. * Don't leak runtime context on calls * export UUID from AMQP * clang-format
- Loading branch information
1 parent
cf4aba7
commit 150d9a3
Showing
74 changed files
with
2,155 additions
and
627 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
sdk/core/azure-core-amqp/inc/azure/core/amqp/internal/common/thread_context.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
#pragma once | ||
|
||
#if ENABLE_RUST_AMQP | ||
#include "../rust_amqp/rust_wrapper/rust_amqp_wrapper.h" | ||
#include "../src/amqp/private/unique_handle.hpp" | ||
|
||
#include <azure/core/azure_assert.hpp> | ||
|
||
#include <atomic> | ||
#include <list> | ||
#include <memory> | ||
#include <mutex> | ||
#include <thread> | ||
|
||
namespace Azure { namespace Core { namespace Amqp { namespace _detail { | ||
|
||
using RustRuntimeContext = RustInterop::RuntimeContext; | ||
|
||
template <> struct UniqueHandleHelper<RustRuntimeContext> | ||
{ | ||
static void FreeRuntimeContext(RustRuntimeContext* obj); | ||
|
||
using type = Core::_internal::BasicUniqueHandle<RustRuntimeContext, FreeRuntimeContext>; | ||
}; | ||
}}}} // namespace Azure::Core::Amqp::_detail | ||
|
||
namespace Azure { namespace Core { namespace Amqp { namespace Common { namespace _detail { | ||
|
||
using UniqueRustRuntimeContext = Azure::Core::Amqp::_detail::UniqueHandleHelper< | ||
Azure::Core::Amqp::_detail::RustRuntimeContext>::type; | ||
class RustThreadContext final { | ||
|
||
UniqueRustRuntimeContext m_runtimeContext; | ||
|
||
public: | ||
RustThreadContext() | ||
: m_runtimeContext(Azure::Core::Amqp::_detail::RustInterop::runtime_context_new()) | ||
{ | ||
} | ||
Azure::Core::Amqp::_detail::RustRuntimeContext* GetRuntimeContext() const noexcept | ||
{ | ||
return m_runtimeContext.get(); | ||
} | ||
}; | ||
|
||
}}}}} // namespace Azure::Core::Amqp::Common::_detail | ||
#endif // ENABLE_RUST_AMQP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.