The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
csznet2023

cPing 多地 ping、MTR 部署工具

  •  
  •   csznet2023 · Jul 7, 2023 · 2174 views
    This topic created in 1041 days ago, the information mentioned may be changed or developed.

    多地 Ping 、MTR 部署工具,需要先运行 Server 端再运行 Client 端,客户端自动注册到服务端

    image image image

    花了一天时间写的,希望各位大佬多多指教,开源地址:https://github.com/csznet/cPing

    8 replies    2023-07-07 23:31:29 +08:00
    0o0O0o0O0o
        1
    0o0O0o0O0o  
       Jul 7, 2023
    一个目录下有两个 func main ,IDE 不会报错吗
    csznet2023
        2
    csznet2023  
    OP
       Jul 7, 2023
    @0o0O0o0O0o 报错我没管,大佬有什么更好的建议么
    harrozze
        3
    harrozze  
       Jul 7, 2023
    @csznet2023 #2

    Makefile 里
    ```
    ...
    go build -tags CLIENT ... client.go
    ...
    go build -tags SERVER ... server.go
    ...
    ```

    server.go

    ```golang
    // +build SERVER
    package main

    ...
    ```

    client.go

    ```golang
    // +build CLIENT
    package main

    ...
    ```
    harrozze
        4
    harrozze  
       Jul 7, 2023
    @harrozze #3 不过好像也没解决 IDE 里报错的问题……
    bigmomo
        5
    bigmomo  
       Jul 7, 2023
    已加星
    0o0O0o0O0o
        6
    0o0O0o0O0o  
       Jul 7, 2023 via iPhone
    分两个目录,或者干脆写一起用运行参数决定是 server 或是 client
    @csznet2023
    csznet2023
        7
    csznet2023  
    OP
       Jul 7, 2023
    @0o0O0o0O0o 分开写对于分布式部署应该体积友好一点吧
    slowman
        8
    slowman  
       Jul 7, 2023
    加油,对标 ping.sx
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   944 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 21:13 · PVG 05:13 · LAX 14:13 · JFK 17:13
    ♥ Do have faith in what you're doing.