brpcweb

command module
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

README

brpcweb

Go Report Card Go Releases Godoc Go Reference LICENSE

brpcweb是专为baidurpc开发一套在线管理控制台,提供在线的服务管理功能。 想了解baidu rpc项目,请查看:[https://github.com/baidu-golang/pbrpc]

overview picture

pic/main.png

Usage

Installing

To start using timewheel, install Go and run go get:

$ go get github.com/jhunters/brpcweb

Start server

Change to your install directory.

./brpcweb

Or Build from source

$ git clone https://github.com/jhunters/brpcweb.git
$ cd brpcweb
$ go build main.go
$ ./main -http=:1031

Open your browser and visit http://localhost:1031

More screenshot

pic/rpcdetail.png

pic/rpcmethods.png

pic/qps.png

Embed web module into your baidu-rpc server

    // param1 listen address
    // param2 reqeust prefix path
    // database file store path 
	module, err := web.NewWebModule(":8080", "/", "./data")
	if err != nil {
		fmt.Println(err)
		return
	}
	defer module.Close()
    // add a rpc server from API
    module.AddRPCServer("本地", "localhost", *port)

	module.StartWeb() // 

more advance usage to publish web server with the same port of rpc server

demo/rpcserver-with-web.go

License

brpcweb is Apache 2.0 licensed.

Documentation

Overview

* @Author: Malin Xie * @Description: main entrance for server to start * @Date: 2021-07-07 12:51:01

Directories

Path Synopsis
* @Author: Malin Xie * @Description: * @Date: 2021-06-04 14:25:31
* @Author: Malin Xie * @Description: * @Date: 2021-06-04 14:25:31
* @Author: Malin Xie * @Description: * @Date: 2021-07-26 14:25:51 * @Author: Malin Xie * @Description: * @Date: 2021-07-26 14:40:41 * web entrance file.
* @Author: Malin Xie * @Description: * @Date: 2021-07-26 14:25:51 * @Author: Malin Xie * @Description: * @Date: 2021-07-26 14:40:41 * web entrance file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL