PengZheng commented on code in PR #802: URL: https://github.com/apache/celix/pull/802#discussion_r2485185862
########## bundles/remote_services/rsa_spi/include/celix_rsa_rpc_factory.h: ########## @@ -0,0 +1,120 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#ifndef CELIX_RSA_RPC_SERVICE_H_ +#define CELIX_RSA_RPC_SERVICE_H_ + +#ifdef __cplusplus +extern "C" { +#endif +#include <endpoint_description.h> +#include <celix_properties.h> +#include <celix_errno.h> +#include <sys/uio.h> + +/** + * @brief The RPC type indicates which protocol is used to (de)serialize the raw data. + */ +#define CELIX_RSA_RPC_TYPE_KEY "celix.remote.admin.rpc_type" + +#define CELIX_RSA_RPC_FACTORY_NAME "celix_rsa_rpc_factory" +#define CELIX_RSA_RPC_FACTORY_VERSION "1.0.0" +#define CELIX_RSA_RPC_FACTORY_USE_RANGE "[1.0.0,2.0.0)" + +/** + * @brief The function type that can be used to send request to remote service endpoint. + */ +typedef celix_status_t (*celix_rsa_send_request_fp)(void *handle, const endpoint_description_t *endpointDescription, + celix_properties_t *metadata, const struct iovec *request, struct iovec *response); + +/** + * @brief The service use to create remote service endpoint and remote service proxy + * @note he service provider is RPC bundle(e.g., Celix::rsa_json_rpc), and the service consumer is RSA bundle(e.g., Celix::rsa_shm). Review Comment: ```suggestion * @note The service provider is RPC bundle(e.g., Celix::rsa_json_rpc), and the service consumer is RSA bundle(e.g., Celix::rsa_shm). ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
