Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
asapo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joao Alvim Oliveira Dias De Almeida
asapo
Commits
8d2fa8f1
Commit
8d2fa8f1
authored
3 years ago
by
Juergen Hannappel
Browse files
Options
Downloads
Patches
Plain Diff
addef function asapo_create_message_header()
parent
ad556cf9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
producer/api/c/include/asapo/producer_c.h
+12
-4
12 additions, 4 deletions
producer/api/c/include/asapo/producer_c.h
producer/api/cpp/src/producer_c_glue.cpp
+18
-0
18 additions, 0 deletions
producer/api/cpp/src/producer_c_glue.cpp
with
30 additions
and
4 deletions
producer/api/c/include/asapo/producer_c.h
+
12
−
4
View file @
8d2fa8f1
...
...
@@ -55,10 +55,10 @@ enum AsapoRequestHandlerType {
//! c version of asapo::IngestModeFlags
enum
AsapoIngestModeFlags
{
kTransferData
=
1
<<
0
,
kTransferMetaDataOnly
=
1
<<
1
,
kStoreInFilesystem
=
1
<<
2
,
kStoreInDatabase
=
1
<<
3
,
kTransferData
=
1
<<
0
,
kTransferMetaDataOnly
=
1
<<
1
,
kStoreInFilesystem
=
1
<<
2
,
kStoreInDatabase
=
1
<<
3
,
};
const
uint64_t
kDefaultIngestMode
=
kTransferData
|
kStoreInFilesystem
|
kStoreInDatabase
;
...
...
@@ -114,6 +114,14 @@ AsapoStreamInfoHandle asapo_producer_get_last_stream(AsapoProducerHandle produce
uint64_t
timeout_ms
,
AsapoErrorHandle
*
error
);
AsapoMessageHeaderHandle
asapo_create_message_header
(
uint64_t
message_id
,
uint64_t
data_size
,
const
char
*
file_name
,
const
char
*
user_metadata
,
uint64_t
dataset_substream
,
uint64_t
dataset_size
,
AsapoBool
auto_id
);
int
asapo_producer_send
(
AsapoProducerHandle
producer
,
const
AsapoMessageHeaderHandle
message_header
,
void
*
data
,
...
...
This diff is collapsed.
Click to expand it.
producer/api/cpp/src/producer_c_glue.cpp
+
18
−
0
View file @
8d2fa8f1
...
...
@@ -104,6 +104,24 @@ extern "C" {
uint64_t
timeout_ms
,
AsapoErrorHandle
*
error
);
AsapoMessageHeaderHandle
asapo_create_message_header
(
uint64_t
message_id
,
uint64_t
data_size
,
const
char
*
file_name
,
const
char
*
user_metadata
,
uint64_t
dataset_substream
,
uint64_t
dataset_size
,
AsapoBool
auto_id
)
{
return
new
AsapoHandlerHolder
<
asapo
::
MessageHeader
>
(
new
asapo
::
MessageHeader
(
message_id
,
data_size
,
file_name
,
user_metadata
,
dataset_substream
,
dataset_size
,
auto_id
!=
0
));
}
#define BUILD_WRAPPER asapo::RequestCallback wrapper = [ = ](asapo::RequestCallbackPayload payload, asapo::Error err) -> void { \
auto payLoadHandle = new AsapoHandlerHolder<asapo::RequestCallbackPayload>(&payload); \
auto errorHandle = new AsapoHandlerHolder<asapo::ErrorInterface>(err.release()); \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment