A service registry and service discovery implemention for kitex based on etcd

kitex etcd

Introduction

kitexetcd is an implemention of service registry and service discovery for kitex based on etcd.

Installation

go get -u github.com/kitex-suites/kitex-etcd

Documenttation

kitexetcd should be used both on server-side and client-side.

Server-Side Service Registry

func main() {
    rgst, _ := kitexetcd.NewEtcdRegistry(&kitexetcd.NewRegistryConfig{
        // http url of etcd server
        EtcdUrl: "http://localhost:2379",
        Weight: 10,
    })

    svr := item.NewServer(new(ItemServiceImpl), server.WithRegistry(rgst))

    err := svr.Run()

    if err != nil {
        log.Println(err.Error())
    }
}

Client-Side Service Discovery

func main() {
    rsv, _ := kitexetcd.NewEtcdResolver(&kitexetcd.NewResolverConfig{
        // http url of etcd server
        EtcdUrl: "http://localhost:2379",
    })

    c, err := itemservice.NewClient("kitex.demo.item", client.WithResolver(rsv))
    if err != nil {
        panic(err)
    }

    req := &item.GetItemRequest{ Id: 1, }
    resp, _ := c.GetItem(context.Background(), req)

    fmt.Println(resp)
}
Similar Resources

Libp2p chat with discovery and pubsub

Dicovery - pubsub chat with libp2p How to test Run boostrap node $ go run main/main.go --port 35005 --nick boot --pk XDLjuaVJ2yKQ2zHMmsee5PGHtDHmkkvFA

Jul 3, 2022

CoreRAD is an extensible and observable IPv6 Neighbor Discovery Protocol router advertisement daemon. Apache 2.0 Licensed.

CoreRAD is an extensible and observable IPv6 Neighbor Discovery Protocol router advertisement daemon. Apache 2.0 Licensed.

CoreRAD CoreRAD is an extensible and observable IPv6 Neighbor Discovery Protocol router advertisement daemon. Apache 2.0 Licensed. To get started with

Nov 14, 2022

EDR-Recon scans Windows services, drivers, processes, registry for installed EDRs.

EDR-Recon scans Windows services, drivers, processes, registry for installed EDRs.

EDR-Recon EDR-Recon scans Windows services, drivers, processes, registry for installed EDRs. Install Binary Download the latest release from the relea

Dec 29, 2022

Pure-Go library for cross-platform local peer discovery using UDP multicast :woman: :repeat: :woman:

Pure-Go library for cross-platform local peer discovery using UDP multicast :woman: :repeat: :woman:

peerdiscovery Pure-go library for cross-platform thread-safe local peer discovery using UDP multicast. I needed to use peer discovery for croc and eve

Jan 8, 2023

Data Availability Sampling (DAS) on a Discovery-v5 DHT overlay

Implementing Data Availability Sampling (DAS) There's a lot of history to unpack here. Vitalik posted about the "Endgame": where ethereum could be hea

Nov 12, 2022

Subfinder is a subdomain discovery tool that discovers valid subdomains for websites by using passive online sources

Subfinder is a subdomain discovery tool that discovers valid subdomains for websites by using passive online sources

Subfinder is a subdomain discovery tool that discovers valid subdomains for websites. Designed as a passive framework to be useful for bug bounties and safe for penetration testing.

Jan 1, 2023

Service that calls uzma24/project1 service, takes input from .txt file and prints JSON output returned from the service.

Service that calls uzma24/project1 service, takes input from .txt file and prints JSON output returned from the service. Program can take large input files.

Feb 6, 2022

Self-hosted and Easy-to-deploy Cloudflare based Dynamic DNS service for router

Self-hosted and Easy-to-deploy Cloudflare based Dynamic DNS service for router

Self-hosted and Easy-to-deploy Cloudflare based Dynamic DNS service for router Contents Features Environment Variables Installation Heroku Docker (Run

Oct 9, 2022

Nat-type-identifier-go - A Go based implementation of Network Address Transalation (NAT) type identifier based on nat-type-identifier

nat-type-identifier-go A Go based implementation of Network Address Transalation

May 8, 2022
Related tags
A REST API for the DN42 registry, written in Go, to provide a bridge between interactive applications and the registry.

dn42regsrv A REST API for the DN42 registry, written in Go, to provide a bridge between interactive applications and registry data. A public instance

Apr 21, 2022
Paster 服务端核心模块,使用字节跳动开源的微服务 RPC 框架 KiteX ,以 Apache Thrift 作为通信协议
Paster 服务端核心模块,使用字节跳动开源的微服务 RPC 框架 KiteX ,以 Apache Thrift 作为通信协议

paster_core Paster 服务端核心模块,使用字节跳动开源的微服务 RPC 框架 KiteX ,以 Apache Thrift 作为通信协议。 Todo: 实现 KiteX 服务注册扩展接口,使用 Consul 服务注册 新增 frame 层,通过 PreProcessor, PostP

Aug 4, 2022
Paster 服务端核心模块,使用字节跳动开源的微服务 RPC 框架 KiteX 通过 Thrift 协议与上游门面模块 paster_facade 通信
Paster 服务端核心模块,使用字节跳动开源的微服务 RPC 框架 KiteX 通过 Thrift 协议与上游门面模块 paster_facade 通信

paster_core Paster 服务端核心模块,使用字节跳动开源的微服务 RPC 框架 KiteX 通过 Thrift 协议与上游门面模块 paster_facade 通信。 Todo: 实现 KiteX 服务注册扩展接口,使用 Consul 服务注册 新增 frame 层 Processor

Aug 7, 2021
Use Consul to do service discovery, use gRPC +kafka to do message produce and consume. Use redis to store result.
Use  Consul to do service discovery, use gRPC +kafka to do message produce and consume. Use redis to store result.

目录 gRPC/consul/kafka简介 gRPC+kafka的Demo gRPC+kafka整体示意图 限流器 基于redis计数器生成唯一ID kafka生产消费 kafka生产消费示意图 本文kafka生产消费过程 基于pprof的性能分析Demo 使用pprof统计CPU/HEAP数据的

Jul 9, 2022
Jun 20, 2022
Envoy-eds-server - Envoy EDS server is a working Envoy Discovery Service implementation

envoy-eds-server Intro Envoy EDS server is a working Envoy Discovery Service imp

Apr 2, 2022
DNS service discovery library for Go

Discovery DNS service discovery library for Go Documentation see pkg.go.dev Installation

Mar 10, 2022
zk2etcd 是一款同步 zookeeper 数据到 etcd 的工具
zk2etcd 是一款同步 zookeeper 数据到 etcd 的工具

zk2etcd zk2etcd 是一款同步 zookeeper 数据到 etcd 的工具 项目背景 在云原生大浪潮下,业务都逐渐上 k8s,许多业务以前使用 zookeeper 作为注册中心,现都逐渐倾向更加贴近云原生的 etcd。 在业务向云原生迁移改造的过程中,可能需要将 zookeeper 中

Sep 1, 2022
A rate limiter for Golang, with ETCD data bindings

Go Rate limiter This package allows us to have a distributed rate limiter, using Redis as a central counter. The limits that are set are only "soft" l

Dec 9, 2021
Subfinder is a subdomain discovery tool that discovers valid subdomains for websites. Designed as a passive framework to be useful for bug bounties and safe for penetration testing.
Subfinder is a subdomain discovery tool that discovers valid subdomains for websites. Designed as a passive framework to be useful for bug bounties and safe for penetration testing.

Fast passive subdomain enumeration tool. Features • Install • Usage • API Setup • License • Join Discord Subfinder is a subdomain discovery tool that

Jan 4, 2023