实例介绍
自己封装的etcd c++ client, 有线上项目使用先例。接口参考头文件,附带测试代码,有需要的话可以随意修改,写的不合适的代码还请见谅。
【实例截图】
【核心代码】
2b4e7c76-a01f-437c-85b0-add8a5162e2e
├── debug
│ ├── EtcdClientV3_d.dll
│ ├── EtcdClientV3_d.exp
│ ├── EtcdClientV3_d.ilk
│ ├── EtcdClientV3_d.lib
│ ├── EtcdClientV3_d.pdb
│ ├── libeay32.dll
│ ├── ssleay32.dll
│ └── zlib.dll
├── EtcdClientV3
│ ├── EtcdClientV3.cpp
│ ├── EtcdClientV3.h
│ ├── EtcdClientV3.vcxproj
│ ├── EtcdClientV3.vcxproj.filters
│ ├── LogManager.cpp
│ ├── LogManager.h
│ ├── Makefile
│ ├── RpcClient.cpp
│ ├── RpcClient.h
│ └── util.h
├── EtcdClientV3.sln
├── grpcplugin
│ └── grpc_cpp_plugin
├── include
│ └── EtcdClientV3API.h
├── linux_lib
│ └── libEtcdClientV3.so
├── proto
│ ├── gen_src
│ │ ├── annotations.pb.cc
│ │ ├── annotations.pb.h
│ │ ├── auth.pb.cc
│ │ ├── auth.pb.h
│ │ ├── gogo.pb.cc
│ │ ├── gogo.pb.h
│ │ ├── http.pb.cc
│ │ ├── http.pb.h
│ │ ├── kv.pb.cc
│ │ ├── kv.pb.h
│ │ ├── rpc.grpc.pb.cc
│ │ ├── rpc.grpc.pb.h
│ │ ├── rpc.pb.cc
│ │ └── rpc.pb.h
│ ├── grpc_cpp_plugin
│ ├── grpc_cpp_plugin.exe
│ ├── linux.bash
│ ├── linux_src
│ │ ├── annotations.pb.cc
│ │ ├── annotations.pb.h
│ │ ├── auth.pb.cc
│ │ ├── auth.pb.h
│ │ ├── gogo.pb.cc
│ │ ├── gogo.pb.h
│ │ ├── http.pb.cc
│ │ ├── http.pb.h
│ │ ├── kv.pb.cc
│ │ ├── kv.pb.h
│ │ ├── rpc.grpc.pb.cc
│ │ ├── rpc.grpc.pb.h
│ │ ├── rpc.pb.cc
│ │ └── rpc.pb.h
│ ├── pb
│ │ ├── annotations.proto
│ │ ├── auth.proto
│ │ ├── descriptor.proto
│ │ ├── gogo.proto
│ │ ├── http.proto
│ │ ├── kv.proto
│ │ └── rpc.proto
│ ├── protoc
│ ├── protoc.exe
│ ├── ReadMe.txt
│ ├── src
│ │ ├── annotations.pb.cc
│ │ ├── annotations.pb.h
│ │ ├── auth.pb.cc
│ │ ├── auth.pb.h
│ │ ├── gogo.pb.cc
│ │ ├── gogo.pb.h
│ │ ├── http.pb.cc
│ │ ├── http.pb.h
│ │ ├── kv.pb.cc
│ │ ├── kv.pb.h
│ │ ├── rpc.grpc.pb.cc
│ │ ├── rpc.grpc.pb.h
│ │ ├── rpc.pb.cc
│ │ └── rpc.pb.h
│ └── win.bat
├── Release
│ ├── EtcdClientV3.dll
│ ├── EtcdClientV3.exp
│ ├── EtcdClientV3.iobj
│ ├── EtcdClientV3.ipdb
│ ├── EtcdClientV3.lib
│ ├── EtcdClientV3.pdb
│ ├── libeay32.dll
│ ├── ssleay32.dll
│ └── zlib.dll
├── script
│ ├── first.bash
│ ├── second.bash
│ └── third.bash
├── TestEtcdClientV3
│ ├── TestEtcdClientV3.vcxproj
│ ├── TestEtcdClientV3.vcxproj.filters
│ ├── TestEtctClientV3.cpp
│ └── test.h
├── trd_include
│ │ └── protobuf
│ │ ├── any.h
│ │ ├── any.pb.h
│ │ ├── any.proto
│ │ ├── api.pb.h
│ │ ├── api.proto
│ │ ├── arena.h
│ │ ├── arenastring.h
│ │ ├── compiler
│ │ │ ├── code_generator.h
│ │ │ ├── command_line_interface.h
│ │ │ ├── cpp
│ │ │ │ └── cpp_generator.h
│ │ │ ├── csharp
│ │ │ │ ├── csharp_generator.h
│ │ │ │ └── csharp_names.h
│ │ │ ├── importer.h
│ │ │ ├── java
│ │ │ │ ├── java_generator.h
│ │ │ │ └── java_names.h
│ │ │ ├── javanano
│ │ │ │ └── javanano_generator.h
│ │ │ ├── js
│ │ │ │ ├── js_generator.h
│ │ │ │ └── well_known_types_embed.h
│ │ │ ├── objectivec
│ │ │ │ ├── objectivec_generator.h
│ │ │ │ └── objectivec_helpers.h
│ │ │ ├── parser.h
│ │ │ ├── php
│ │ │ │ └── php_generator.h
│ │ │ ├── plugin.h
│ │ │ ├── plugin.pb.h
│ │ │ ├── plugin.proto
│ │ │ ├── profile.pb.h
│ │ │ ├── profile.proto
│ │ │ ├── python
│ │ │ │ └── python_generator.h
│ │ │ └── ruby
│ │ │ └── ruby_generator.h
│ │ ├── descriptor_database.h
│ │ ├── descriptor.h
│ │ ├── descriptor.pb.h
│ │ ├── descriptor.proto
│ │ ├── duration.pb.h
│ │ ├── duration.proto
│ │ ├── dynamic_message.h
│ │ ├── empty.pb.h
│ │ ├── empty.proto
│ │ ├── extension_set.h
│ │ ├── field_mask.pb.h
│ │ ├── field_mask.proto
│ │ ├── generated_enum_reflection.h
│ │ ├── generated_enum_util.h
│ │ ├── generated_message_reflection.h
│ │ ├── generated_message_table_driven.h
│ │ ├── generated_message_util.h
│ │ ├── has_bits.h
│ │ ├── io
│ │ │ ├── coded_stream.h
│ │ │ ├── gzip_stream.h
│ │ │ ├── printer.h
│ │ │ ├── strtod.h
│ │ │ ├── tokenizer.h
│ │ │ ├── zero_copy_stream.h
│ │ │ ├── zero_copy_stream_impl.h
│ │ │ └── zero_copy_stream_impl_lite.h
│ │ ├── map_entry.h
│ │ ├── map_entry_lite.h
│ │ ├── map_field.h
│ │ ├── map_field_inl.h
│ │ ├── map_field_lite.h
│ │ ├── map.h
│ │ ├── map_type_handler.h
│ │ ├── message.h
│ │ ├── message_lite.h
│ │ ├── metadata.h
│ │ ├── metadata_lite.h
│ │ ├── reflection.h
│ │ ├── reflection_ops.h
│ │ ├── repeated_field.h
│ │ ├── service.h
│ │ ├── source_context.pb.h
│ │ ├── source_context.proto
│ │ ├── struct.pb.h
│ │ ├── struct.proto
│ │ ├── stubs
│ │ │ ├── atomicops.h
│ │ │ ├── atomicops_internals_arm64_gcc.h
│ │ │ ├── atomicops_internals_arm_gcc.h
│ │ │ ├── atomicops_internals_arm_qnx.h
│ │ │ ├── atomicops_internals_atomicword_compat.h
│ │ │ ├── atomicops_internals_generic_c11_atomic.h
│ │ │ ├── atomicops_internals_generic_gcc.h
│ │ │ ├── atomicops_internals_mips_gcc.h
│ │ │ ├── atomicops_internals_power.h
│ │ │ ├── atomicops_internals_ppc_gcc.h
│ │ │ ├── atomicops_internals_solaris.h
│ │ │ ├── atomicops_internals_tsan.h
│ │ │ ├── atomicops_internals_x86_gcc.h
│ │ │ ├── atomicops_internals_x86_msvc.h
│ │ │ ├── atomic_sequence_num.h
│ │ │ ├── bytestream.h
│ │ │ ├── callback.h
│ │ │ ├── casts.h
│ │ │ ├── common.h
│ │ │ ├── fastmem.h
│ │ │ ├── hash.h
│ │ │ ├── logging.h
│ │ │ ├── macros.h
│ │ │ ├── mutex.h
│ │ │ ├── once.h
│ │ │ ├── platform_macros.h
│ │ │ ├── port.h
│ │ │ ├── scoped_ptr.h
│ │ │ ├── shared_ptr.h
│ │ │ ├── singleton.h
│ │ │ ├── status.h
│ │ │ ├── stl_util.h
│ │ │ ├── stringpiece.h
│ │ │ ├── template_util.h
│ │ │ └── type_traits.h
│ │ ├── text_format.h
│ │ ├── timestamp.pb.h
│ │ ├── timestamp.proto
│ │ ├── type.pb.h
│ │ ├── type.proto
│ │ ├── unknown_field_set.h
│ │ ├── util
│ │ │ ├── delimited_message_util.h
│ │ │ ├── field_comparator.h
│ │ │ ├── field_mask_util.h
│ │ │ ├── json_util.h
│ │ │ ├── message_differencer.h
│ │ │ ├── time_util.h
│ │ │ ├── type_resolver.h
│ │ │ └── type_resolver_util.h
│ │ ├── wire_format.h
│ │ ├── wire_format_lite.h
│ │ ├── wire_format_lite_inl.h
│ │ ├── wrappers.pb.h
│ │ └── wrappers.proto
│ ├── grpc
│ │ ├── byte_buffer.h
│ │ ├── byte_buffer_reader.h
│ │ ├── census.h
│ │ ├── compression.h
│ │ ├── grpc_cronet.h
│ │ ├── grpc.h
│ │ ├── grpc_posix.h
│ │ ├── grpc_security_constants.h
│ │ ├── grpc_security.h
│ │ ├── impl
│ │ │ └── codegen
│ │ │ ├── atm_gcc_atomic.h
│ │ │ ├── atm_gcc_sync.h
│ │ │ ├── atm.h
│ │ │ ├── atm_windows.h
│ │ │ ├── byte_buffer_reader.h
│ │ │ ├── compression_types.h
│ │ │ ├── connectivity_state.h
│ │ │ ├── exec_ctx_fwd.h
│ │ │ ├── gpr_slice.h
│ │ │ ├── gpr_types.h
│ │ │ ├── grpc_types.h
│ │ │ ├── port_platform.h
│ │ │ ├── propagation_bits.h
│ │ │ ├── slice.h
│ │ │ ├── status.h
│ │ │ ├── sync_generic.h
│ │ │ ├── sync.h
│ │ │ ├── sync_posix.h
│ │ │ └── sync_windows.h
│ │ ├── load_reporting.h
│ │ ├── module.modulemap
│ │ ├── slice_buffer.h
│ │ ├── slice.h
│ │ ├── status.h
│ │ └── support
│ │ ├── alloc.h
│ │ ├── atm_gcc_atomic.h
│ │ ├── atm_gcc_sync.h
│ │ ├── atm.h
│ │ ├── atm_windows.h
│ │ ├── avl.h
│ │ ├── cmdline.h
│ │ ├── cpu.h
│ │ ├── histogram.h
│ │ ├── host_port.h
│ │ ├── log.h
│ │ ├── log_windows.h
│ │ ├── port_platform.h
│ │ ├── string_util.h
│ │ ├── subprocess.h
│ │ ├── sync_generic.h
│ │ ├── sync.h
│ │ ├── sync_posix.h
│ │ ├── sync_windows.h
│ │ ├── thd.h
│ │ ├── time.h
│ │ ├── tls_gcc.h
│ │ ├── tls.h
│ │ ├── tls_msvc.h
│ │ ├── tls_pthread.h
│ │ ├── useful.h
│ │ └── workaround_list.h
│ └── grpc++
│ ├── alarm.h
│ ├── channel.h
│ ├── client_context.h
│ ├── completion_queue.h
│ ├── create_channel.h
│ ├── create_channel_posix.h
│ ├── ext
│ │ ├── health_check_service_server_builder_option.h
│ │ └── proto_server_reflection_plugin.h
│ ├── generic
│ │ ├── async_generic_service.h
│ │ └── generic_stub.h
│ ├── grpc++.h
│ ├── health_check_service_interface.h
│ ├── impl
│ │ ├── call.h
│ │ ├── channel_argument_option.h
│ │ ├── client_unary_call.h
│ │ ├── codegen
│ │ │ ├── async_stream.h
│ │ │ ├── async_unary_call.h
│ │ │ ├── call.h
│ │ │ ├── call_hook.h
│ │ │ ├── channel_interface.h
│ │ │ ├── client_context.h
│ │ │ ├── client_unary_call.h
│ │ │ ├── completion_queue.h
│ │ │ ├── completion_queue_tag.h
│ │ │ ├── config.h
│ │ │ ├── config_protobuf.h
│ │ │ ├── core_codegen.h
│ │ │ ├── core_codegen_interface.h
│ │ │ ├── create_auth_context.h
│ │ │ ├── grpc_library.h
│ │ │ ├── metadata_map.h
│ │ │ ├── method_handler_impl.h
│ │ │ ├── proto_utils.h
│ │ │ ├── rpc_method.h
│ │ │ ├── rpc_service_method.h
│ │ │ ├── security
│ │ │ │ └── auth_context.h
│ │ │ ├── serialization_traits.h
│ │ │ ├── server_context.h
│ │ │ ├── server_interface.h
│ │ │ ├── service_type.h
│ │ │ ├── slice.h
│ │ │ ├── status_code_enum.h
│ │ │ ├── status.h
│ │ │ ├── string_ref.h
│ │ │ ├── stub_options.h
│ │ │ ├── sync_stream.h
│ │ │ └── time.h
│ │ ├── grpc_library.h
│ │ ├── method_handler_impl.h
│ │ ├── README.md
│ │ ├── rpc_method.h
│ │ ├── rpc_service_method.h
│ │ ├── serialization_traits.h
│ │ ├── server_builder_option.h
│ │ ├── server_builder_plugin.h
│ │ ├── server_initializer.h
│ │ ├── service_type.h
│ │ ├── sync_cxx11.h
│ │ └── sync_no_cxx11.h
│ ├── resource_quota.h
│ ├── security
│ │ ├── auth_context.h
│ │ ├── auth_metadata_processor.h
│ │ ├── credentials.h
│ │ └── server_credentials.h
│ ├── server_builder.h
│ ├── server_context.h
│ ├── server.h
│ ├── server_posix.h
│ ├── support
│ │ ├── async_stream.h
│ │ ├── async_unary_call.h
│ │ ├── byte_buffer.h
│ │ ├── channel_arguments.h
│ │ ├── config.h
│ │ ├── error_details.h
│ │ ├── slice.h
│ │ ├── status_code_enum.h
│ │ ├── status.h
│ │ ├── string_ref.h
│ │ ├── stub_options.h
│ │ ├── sync_stream.h
│ │ └── time.h
│ └── test
│ ├── mock_stream.h
│ └── server_context_test_spouse.h
└── trd_lib
├── gpr_d.lib
├── gpr.lib
├── grpc++_d.lib
├── grpc_d.lib
├── grpc++.lib
├── grpc.lib
├── grpc_plugin_support.lib
├── libeay32.dll
├── libeay32.lib
├── libprotobuf.lib
├── ssleay32.dll
├── ssleay32.lib
├── zlib.dll
├── zlib.lib
└── zlibwapi.lib
43 directories, 380 files
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论