Coder Social home page Coder Social logo

network_zenoh's Introduction

network_zenoh

CITA-Cloudnetwork微服务的实现,基于zenoh

编译docker镜像

docker build -t citacloud/network_zenoh .

使用方法

$ network -h
network 6.7.0
Rivtower Technologies <[email protected]>

Usage: network <COMMAND>

Commands:
  run   run this service
  help  Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

network-run

运行network服务。

$ network run -h
run this service

Usage: network run [OPTIONS]

Options:
  -c, --config <CONFIG_PATH>  Chain config path [default: config.toml]
  -h, --help                  Print help

参数:

  1. config 微服务配置文件。

    参见示例example/config.toml

    其中[network_zenoh]

    • ca_certCA根证书。
    • cert 为节点证书。
    • priv_key 为节点证书对应的私钥。
    • grpc_portgRPC服务监听的端口号。
    • protocolzenoh服务协议类型:tls, tcp, quic
    • domain 为域名
    • portzenoh服务监听端口
    • peerszenoh邻居节点的网络信息,其中protocol字段为服务协议类型,port字段为端口号,domain字段为该邻居节点申请证书时使用的域名。
    • chain_id 链的唯一标识
    • node_address 节点地址文件路径
    • validator_address 共识节点地址文件路径
    • modules 为同节点的其它微服务网络信息,其中module_name字段为模块名称,port字段为该微服务的grpc端口号,hostname字段为该微服务的网络地址。
    • hot_update_interval 节点配置热更新间隔时间(以秒为单位)
    • health_check_timeout 健康检查超时时间(以秒为单位)
    • rx_buffer_size 每个链接的接收缓冲区大小(以字节为单位)

    其中[network_zenoh.log_config]段为微服务日志的配置:

    • max_level 日志等级
    • filter 日志过滤配置
    • service_name 服务名称,用作日志文件名与日志采集的服务名称
    • rolling_file_path 日志文件路径
    • agent_endpoint jaeger 采集端地址
$ network run -c example/config.toml

2023-02-08T09:38:08.501559Z  INFO network: grpc port of network_zenoh: 50000
2023-02-08T09:38:08.502427Z  INFO network: start network_zenoh grpc server!
2023-02-08T09:38:08.502463Z  INFO network: metrics on
2023-02-08T09:38:08.502533Z  INFO cloud_util::metrics: exporting metrics to http://0.0.0.0:60000/metrics
2023-02-08T09:38:08.504638Z  INFO zenoh::net::runtime: Using PID: 7A38F110A4661FE3    
2023-02-08T09:38:08.514381Z  INFO zenoh::net::runtime::orchestrator: zenohd can be reached at quic/127.0.0.1:40000 

设计

network_zenoh's People

Contributors

acechef avatar jayanring avatar jlerxky avatar naughtydogofschrodinger avatar rink1969 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.