Coder Social home page Coder Social logo

server.go

注册新的 ip 到 etcd 的 services/ 中,被 master 监听

master.go

监听 server.go 向 etcd services/ 中监听到的新ip

前置工作

需修改 master.go ,runserver/*.go 文件的 ip http://192.168.0.229 为自己etcd 所在 ip

启动

启动 etcd 单机集群

sh start_etcd.sh 1
sh start_etcd.sh 2
sh start_etcd.sh 3

启动 master 监听服务

go  run master.go

启动测试添加新的服务器服务,测试启动两台server

cd runserver
go run server.go
go run server-1.go

陈鹏杰's Projects

books icon books

【编程随想】收藏的电子书清单(多个学科,含下载链接)

easyswoole_clean icon easyswoole_clean

一个用 EasySwoole 与 ElasticSearch 打造高性能小视频服务系统

gmsm icon gmsm

GM SM2/3/4 library based on Golang (基于Go语言的国密SM2/SM3/SM4算法库)

go-common icon go-common

哔哩哔哩 bilibili 网站后台工程 源码

go_im icon go_im

可放语音,聊天,群聊,发图片

growth-ebook icon growth-ebook

Growth Engineering: The Definitive Guide。全栈增长工程师指南

learn icon learn

这是一个用来测试的库

nat icon nat

go实现的内网穿透

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.