Skip to content

Commit 4dc84d4

Browse files
bretambroseBret Ambrose
and
Bret Ambrose
authored
windowsUser addition to RunInfo (#359)
* windowsUser addition to RunInfo * Add secure_tunneling to formatting Co-authored-by: Bret Ambrose <[email protected]>
1 parent 64be316 commit 4dc84d4

File tree

6 files changed

+232
-430
lines changed

6 files changed

+232
-430
lines changed

eventstream_rpc/tests/include/awstest/EchoTestRpcClient.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@ namespace Awstest
2626
Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) noexcept;
2727
/**
2828
* Connect the client to the server
29-
* @param lifecycleHandler An interface that is called upon when lifecycle
30-
* events relating to the connection occur.
31-
* @param connectionConfig The configuration parameters used for establishing
32-
* the connection.
33-
* @return An `RpcError` that can be used to check whether the connection was
34-
* established.
29+
* @param lifecycleHandler An interface that is called upon when lifecycle events relating to the connection
30+
* occur.
31+
* @param connectionConfig The configuration parameters used for establishing the connection.
32+
* @return An `RpcError` that can be used to check whether the connection was established.
3533
*/
3634
std::future<RpcError> Connect(
3735
ConnectionLifecycleHandler &lifecycleHandler,

eventstream_rpc/tests/include/awstest/EchoTestRpcModel.h

Lines changed: 35 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ namespace Awstest
6161
Aws::Crt::StringView,
6262
Aws::Crt::Allocator *) noexcept;
6363
static void s_customDeleter(Customer *) noexcept;
64-
/* This needs to be defined so that `Customer` can be used as a key in maps.
65-
*/
64+
/* This needs to be defined so that `Customer` can be used as a key in maps. */
6665
bool operator<(const Customer &) const noexcept;
6766
static const char *MODEL_NAME;
6867

@@ -157,8 +156,7 @@ namespace Awstest
157156
Aws::Crt::StringView,
158157
Aws::Crt::Allocator *) noexcept;
159158
static void s_customDeleter(MessageData *) noexcept;
160-
/* This needs to be defined so that `MessageData` can be used as a key in
161-
* maps. */
159+
/* This needs to be defined so that `MessageData` can be used as a key in maps. */
162160
bool operator<(const MessageData &) const noexcept;
163161
static const char *MODEL_NAME;
164162

@@ -221,8 +219,7 @@ namespace Awstest
221219
Aws::Crt::StringView,
222220
Aws::Crt::Allocator *) noexcept;
223221
static void s_customDeleter(EchoStreamingMessage *) noexcept;
224-
/* This needs to be defined so that `EchoStreamingMessage` can be used as a
225-
* key in maps. */
222+
/* This needs to be defined so that `EchoStreamingMessage` can be used as a key in maps. */
226223
bool operator<(const EchoStreamingMessage &) const noexcept;
227224
static const char *MODEL_NAME;
228225

@@ -252,8 +249,7 @@ namespace Awstest
252249
Aws::Crt::StringView,
253250
Aws::Crt::Allocator *) noexcept;
254251
static void s_customDeleter(GetAllProductsResponse *) noexcept;
255-
/* This needs to be defined so that `GetAllProductsResponse` can be used as a
256-
* key in maps. */
252+
/* This needs to be defined so that `GetAllProductsResponse` can be used as a key in maps. */
257253
bool operator<(const GetAllProductsResponse &) const noexcept;
258254
static const char *MODEL_NAME;
259255

@@ -275,8 +271,7 @@ namespace Awstest
275271
Aws::Crt::StringView,
276272
Aws::Crt::Allocator *) noexcept;
277273
static void s_customDeleter(GetAllProductsRequest *) noexcept;
278-
/* This needs to be defined so that `GetAllProductsRequest` can be used as a
279-
* key in maps. */
274+
/* This needs to be defined so that `GetAllProductsRequest` can be used as a key in maps. */
280275
bool operator<(const GetAllProductsRequest &) const noexcept;
281276
static const char *MODEL_NAME;
282277

@@ -299,8 +294,7 @@ namespace Awstest
299294
Aws::Crt::StringView,
300295
Aws::Crt::Allocator *) noexcept;
301296
static void s_customDeleter(GetAllCustomersResponse *) noexcept;
302-
/* This needs to be defined so that `GetAllCustomersResponse` can be used as a
303-
* key in maps. */
297+
/* This needs to be defined so that `GetAllCustomersResponse` can be used as a key in maps. */
304298
bool operator<(const GetAllCustomersResponse &) const noexcept;
305299
static const char *MODEL_NAME;
306300

@@ -322,8 +316,7 @@ namespace Awstest
322316
Aws::Crt::StringView,
323317
Aws::Crt::Allocator *) noexcept;
324318
static void s_customDeleter(GetAllCustomersRequest *) noexcept;
325-
/* This needs to be defined so that `GetAllCustomersRequest` can be used as a
326-
* key in maps. */
319+
/* This needs to be defined so that `GetAllCustomersRequest` can be used as a key in maps. */
327320
bool operator<(const GetAllCustomersRequest &) const noexcept;
328321
static const char *MODEL_NAME;
329322

@@ -346,8 +339,7 @@ namespace Awstest
346339
Aws::Crt::StringView,
347340
Aws::Crt::Allocator *) noexcept;
348341
static void s_customDeleter(EchoMessageResponse *) noexcept;
349-
/* This needs to be defined so that `EchoMessageResponse` can be used as a key
350-
* in maps. */
342+
/* This needs to be defined so that `EchoMessageResponse` can be used as a key in maps. */
351343
bool operator<(const EchoMessageResponse &) const noexcept;
352344
static const char *MODEL_NAME;
353345

@@ -371,8 +363,7 @@ namespace Awstest
371363
Aws::Crt::StringView,
372364
Aws::Crt::Allocator *) noexcept;
373365
static void s_customDeleter(EchoMessageRequest *) noexcept;
374-
/* This needs to be defined so that `EchoMessageRequest` can be used as a key
375-
* in maps. */
366+
/* This needs to be defined so that `EchoMessageRequest` can be used as a key in maps. */
376367
bool operator<(const EchoMessageRequest &) const noexcept;
377368
static const char *MODEL_NAME;
378369

@@ -394,8 +385,7 @@ namespace Awstest
394385
Aws::Crt::StringView,
395386
Aws::Crt::Allocator *) noexcept;
396387
static void s_customDeleter(EchoStreamingResponse *) noexcept;
397-
/* This needs to be defined so that `EchoStreamingResponse` can be used as a
398-
* key in maps. */
388+
/* This needs to be defined so that `EchoStreamingResponse` can be used as a key in maps. */
399389
bool operator<(const EchoStreamingResponse &) const noexcept;
400390
static const char *MODEL_NAME;
401391

@@ -416,8 +406,7 @@ namespace Awstest
416406
Aws::Crt::StringView,
417407
Aws::Crt::Allocator *) noexcept;
418408
static void s_customDeleter(EchoStreamingRequest *) noexcept;
419-
/* This needs to be defined so that `EchoStreamingRequest` can be used as a
420-
* key in maps. */
409+
/* This needs to be defined so that `EchoStreamingRequest` can be used as a key in maps. */
421410
bool operator<(const EchoStreamingRequest &) const noexcept;
422411
static const char *MODEL_NAME;
423412

@@ -442,8 +431,7 @@ namespace Awstest
442431
Aws::Crt::StringView,
443432
Aws::Crt::Allocator *) noexcept;
444433
static void s_customDeleter(ServiceError *) noexcept;
445-
/* This needs to be defined so that `ServiceError` can be used as a key in
446-
* maps. */
434+
/* This needs to be defined so that `ServiceError` can be used as a key in maps. */
447435
bool operator<(const ServiceError &) const noexcept;
448436
static const char *MODEL_NAME;
449437

@@ -466,8 +454,7 @@ namespace Awstest
466454
Aws::Crt::StringView,
467455
Aws::Crt::Allocator *) noexcept;
468456
static void s_customDeleter(CauseServiceErrorResponse *) noexcept;
469-
/* This needs to be defined so that `CauseServiceErrorResponse` can be used as
470-
* a key in maps. */
457+
/* This needs to be defined so that `CauseServiceErrorResponse` can be used as a key in maps. */
471458
bool operator<(const CauseServiceErrorResponse &) const noexcept;
472459
static const char *MODEL_NAME;
473460

@@ -488,8 +475,7 @@ namespace Awstest
488475
Aws::Crt::StringView,
489476
Aws::Crt::Allocator *) noexcept;
490477
static void s_customDeleter(CauseServiceErrorRequest *) noexcept;
491-
/* This needs to be defined so that `CauseServiceErrorRequest` can be used as
492-
* a key in maps. */
478+
/* This needs to be defined so that `CauseServiceErrorRequest` can be used as a key in maps. */
493479
bool operator<(const CauseServiceErrorRequest &) const noexcept;
494480
static const char *MODEL_NAME;
495481

@@ -547,10 +533,8 @@ namespace Awstest
547533
/**
548534
* Used to activate a stream for the `GetAllProductsOperation`
549535
* @param request The request used for the `GetAllProductsOperation`
550-
* @param onMessageFlushCallback An optional callback that is invoked when the
551-
* request is flushed.
552-
* @return An `RpcError` that can be used to check whether the stream was
553-
* activated.
536+
* @param onMessageFlushCallback An optional callback that is invoked when the request is flushed.
537+
* @return An `RpcError` that can be used to check whether the stream was activated.
554538
*/
555539
std::future<RpcError> Activate(
556540
const GetAllProductsRequest &request,
@@ -612,10 +596,8 @@ namespace Awstest
612596
/**
613597
* Used to activate a stream for the `CauseServiceErrorOperation`
614598
* @param request The request used for the `CauseServiceErrorOperation`
615-
* @param onMessageFlushCallback An optional callback that is invoked when the
616-
* request is flushed.
617-
* @return An `RpcError` that can be used to check whether the stream was
618-
* activated.
599+
* @param onMessageFlushCallback An optional callback that is invoked when the request is flushed.
600+
* @return An `RpcError` that can be used to check whether the stream was activated.
619601
*/
620602
std::future<RpcError> Activate(
621603
const CauseServiceErrorRequest &request,
@@ -635,10 +617,8 @@ namespace Awstest
635617
virtual void OnStreamEvent(EchoStreamingMessage *response) { (void)response; }
636618

637619
/**
638-
* A callback that is invoked when an error occurs while parsing a message
639-
* from the stream.
640-
* @param rpcError The RPC error containing the status and possibly a CRT
641-
* error.
620+
* A callback that is invoked when an error occurs while parsing a message from the stream.
621+
* @param rpcError The RPC error containing the status and possibly a CRT error.
642622
*/
643623
virtual bool OnStreamError(RpcError rpcError)
644624
{
@@ -657,8 +637,7 @@ namespace Awstest
657637
}
658638

659639
/**
660-
* A callback that is invoked upon receiving ANY error response from the
661-
* server.
640+
* A callback that is invoked upon receiving ANY error response from the server.
662641
* @param operationError The error message being received.
663642
*/
664643
virtual bool OnStreamError(OperationError *operationError)
@@ -673,8 +652,7 @@ namespace Awstest
673652
*/
674653
void OnStreamEvent(Aws::Crt::ScopedResource<AbstractShapeBase> response) override;
675654
/**
676-
* Invoked when a message is received on this continuation but results in an
677-
* error.
655+
* Invoked when a message is received on this continuation but results in an error.
678656
*
679657
* This callback can return true so that the stream is closed afterwards.
680658
*/
@@ -730,12 +708,9 @@ namespace Awstest
730708
Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) noexcept;
731709
/**
732710
* Used to activate a stream for the `CauseStreamServiceToErrorOperation`
733-
* @param request The request used for the
734-
* `CauseStreamServiceToErrorOperation`
735-
* @param onMessageFlushCallback An optional callback that is invoked when the
736-
* request is flushed.
737-
* @return An `RpcError` that can be used to check whether the stream was
738-
* activated.
711+
* @param request The request used for the `CauseStreamServiceToErrorOperation`
712+
* @param onMessageFlushCallback An optional callback that is invoked when the request is flushed.
713+
* @return An `RpcError` that can be used to check whether the stream was activated.
739714
*/
740715
std::future<RpcError> Activate(
741716
const EchoStreamingRequest &request,
@@ -755,10 +730,8 @@ namespace Awstest
755730
virtual void OnStreamEvent(EchoStreamingMessage *response) { (void)response; }
756731

757732
/**
758-
* A callback that is invoked when an error occurs while parsing a message
759-
* from the stream.
760-
* @param rpcError The RPC error containing the status and possibly a CRT
761-
* error.
733+
* A callback that is invoked when an error occurs while parsing a message from the stream.
734+
* @param rpcError The RPC error containing the status and possibly a CRT error.
762735
*/
763736
virtual bool OnStreamError(RpcError rpcError)
764737
{
@@ -767,8 +740,7 @@ namespace Awstest
767740
}
768741

769742
/**
770-
* A callback that is invoked upon receiving ANY error response from the
771-
* server.
743+
* A callback that is invoked upon receiving ANY error response from the server.
772744
* @param operationError The error message being received.
773745
*/
774746
virtual bool OnStreamError(OperationError *operationError)
@@ -783,8 +755,7 @@ namespace Awstest
783755
*/
784756
void OnStreamEvent(Aws::Crt::ScopedResource<AbstractShapeBase> response) override;
785757
/**
786-
* Invoked when a message is received on this continuation but results in an
787-
* error.
758+
* Invoked when a message is received on this continuation but results in an error.
788759
*
789760
* This callback can return true so that the stream is closed afterwards.
790761
*/
@@ -839,10 +810,8 @@ namespace Awstest
839810
/**
840811
* Used to activate a stream for the `EchoStreamMessagesOperation`
841812
* @param request The request used for the `EchoStreamMessagesOperation`
842-
* @param onMessageFlushCallback An optional callback that is invoked when the
843-
* request is flushed.
844-
* @return An `RpcError` that can be used to check whether the stream was
845-
* activated.
813+
* @param onMessageFlushCallback An optional callback that is invoked when the request is flushed.
814+
* @return An `RpcError` that can be used to check whether the stream was activated.
846815
*/
847816
std::future<RpcError> Activate(
848817
const EchoStreamingRequest &request,
@@ -904,10 +873,8 @@ namespace Awstest
904873
/**
905874
* Used to activate a stream for the `EchoMessageOperation`
906875
* @param request The request used for the `EchoMessageOperation`
907-
* @param onMessageFlushCallback An optional callback that is invoked when the
908-
* request is flushed.
909-
* @return An `RpcError` that can be used to check whether the stream was
910-
* activated.
876+
* @param onMessageFlushCallback An optional callback that is invoked when the request is flushed.
877+
* @return An `RpcError` that can be used to check whether the stream was activated.
911878
*/
912879
std::future<RpcError> Activate(
913880
const EchoMessageRequest &request,
@@ -969,10 +936,8 @@ namespace Awstest
969936
/**
970937
* Used to activate a stream for the `GetAllCustomersOperation`
971938
* @param request The request used for the `GetAllCustomersOperation`
972-
* @param onMessageFlushCallback An optional callback that is invoked when the
973-
* request is flushed.
974-
* @return An `RpcError` that can be used to check whether the stream was
975-
* activated.
939+
* @param onMessageFlushCallback An optional callback that is invoked when the request is flushed.
940+
* @return An `RpcError` that can be used to check whether the stream was activated.
976941
*/
977942
std::future<RpcError> Activate(
978943
const GetAllCustomersRequest &request,

format-check.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if NOT type $CLANG_FORMAT 2> /dev/null ; then
1010
fi
1111

1212
FAIL=0
13-
SOURCE_FILES=`find devicedefender discovery eventstream_rpc greengrass_ipc identity iotdevicecommon jobs shadow samples -type f \( -name '*.h' -o -name '*.cpp' \)`
13+
SOURCE_FILES=`find devicedefender discovery eventstream_rpc greengrass_ipc identity iotdevicecommon jobs shadow samples secure_tunneling -type f \( -name '*.h' -o -name '*.cpp' \)`
1414
for i in $SOURCE_FILES
1515
do
1616
$CLANG_FORMAT -output-replacements-xml $i | grep -c "<replacement " > /dev/null

greengrass_ipc/include/aws/greengrass/GreengrassCoreIpcClient.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,10 @@ namespace Aws
2828
Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) noexcept;
2929
/**
3030
* Connect the client to the server
31-
* @param lifecycleHandler An interface that is called upon when lifecycle
32-
* events relating to the connection occur.
33-
* @param connectionConfig The configuration parameters used for establishing
34-
* the connection.
35-
* @return An `RpcError` that can be used to check whether the connection was
36-
* established.
31+
* @param lifecycleHandler An interface that is called upon when lifecycle events relating to the connection
32+
* occur.
33+
* @param connectionConfig The configuration parameters used for establishing the connection.
34+
* @return An `RpcError` that can be used to check whether the connection was established.
3735
*/
3836
std::future<RpcError> Connect(
3937
ConnectionLifecycleHandler &lifecycleHandler,

0 commit comments

Comments
 (0)