Skip to content

xuyp1991/grpc_plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

grpc_XXX_plugin

Description

grpc_server_plugin provide a function to get grpc request
grpc_client_plugin provide a function to send grpc request
those plugin just provide function to get a grpc request and send a grpc request,the Specific application scenarios require secondary development.
Currently the plugin only work with official eosforce repository.

Installation

Install grpc

grpc_XXX_plugin rely on grpc

git clone https://github.com/grpc/grpc
cd grpc
git submodule update --init --recursive

Grpc directory in the same directory of eosforce

Embed grpc_server_plugin grpc_client_plugin into nodeos

  1. Get grpc_server_plugin grpc_client_pluginsource code.
git clone https://github.com/EOSLaoMao/elasticsearch_plugin.git plugins/elasticsearch_plugin
cd plugins/elasticsearch_plugin
git submodule update --init --recursive
...
add_subdirectory(mongo_db_plugin)
add_subdirectory(login_plugin)
add_subdirectory(login_plugin)
add_subdirectory(grpc_server_plugin) # add this line.
add_subdirectory(grpc_client_plugin) # add this line.
...
  1. Add following line to programs/nodeos/CMakeLists.txt.
target_link_libraries( ${NODE_EXECUTABLE_NAME}
        PRIVATE appbase
        PRIVATE -Wl,${whole_archive_flag} login_plugin               -Wl,${no_whole_archive_flag}
        PRIVATE -Wl,${whole_archive_flag} history_plugin             -Wl,${no_whole_archive_flag}
        ...
        # add this line.
        PRIVATE -Wl,${whole_archive_flag} grpc_server_plugin       -Wl,${no_whole_archive_flag}
        # add this line.
        PRIVATE -Wl,${whole_archive_flag} grpc_client_plugin       -Wl,${no_whole_archive_flag}
        ...

Usage

The usage of grpc_server_plugin grpc_client_plugin is simple
--grpc-server-address grpc-server-address string.grcp server bind ip and port.
--grpc-client-address grpc-client-address string.grcp server bind ip and port.

About

grpc_plugin for eosforce

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors