radiant

所属分类:代理服务器
开发工具:GO
文件大小:0KB
下载次数:0
上传日期:2018-12-05 03:24:57
上 传 者sh-1993
说明:  基于GRPC构建并由Caddy提供支持的可编程第7层代理服务
(Programmable layer 7 proxy service built on GRPC and powered by Caddy)

文件列表:
Dockerfile (1018, 2018-12-04)
Dockerfile.build (905, 2018-12-04)
LICENSE (1074, 2018-12-04)
Makefile (3096, 2018-12-04)
Protobuild.toml (1769, 2018-12-04)
api/ (0, 2018-12-04)
api/v1/ (0, 2018-12-04)
api/v1/doc.go (12, 2018-12-04)
api/v1/proxy.pb.go (29359, 2018-12-04)
api/v1/proxy.proto (1643, 2018-12-04)
client.go (2470, 2018-12-04)
client_opts.go (1214, 2018-12-04)
cmd/ (0, 2018-12-04)
cmd/radiant/ (0, 2018-12-04)
cmd/radiant/main.go (1736, 2018-12-04)
cmd/rctl/ (0, 2018-12-04)
cmd/rctl/main.go (1568, 2018-12-04)
cmd/rctl/servers.go (2395, 2018-12-04)
config.go (158, 2018-12-04)
docs/ (0, 2018-12-04)
docs/blackbird.png (941220, 2018-12-04)
ds/ (0, 2018-12-04)
ds/ds.go (393, 2018-12-04)
ds/memory/ (0, 2018-12-04)
ds/memory/memory.go (664, 2018-12-04)
go.mod (668, 2018-12-04)
go.sum (14771, 2018-12-04)
radiant.jpg (127270, 2018-12-04)
server/ (0, 2018-12-04)
server/add.go (343, 2018-12-04)
server/config.go (2504, 2018-12-04)
server/helpers.go (448, 2018-12-04)
server/reload.go (515, 2018-12-04)
server/remove.go (333, 2018-12-04)
server/server.go (328, 2018-12-04)
server/service.go (2889, 2018-12-04)
vendor/ (0, 2018-12-04)
vendor/github.com/ (0, 2018-12-04)
... ...

![Radiant](https://github.com/stellarproject/radiant/blob/master/radiant.jpg) [Photo by Jakub Novacek on Pexels](https://github.com/stellarproject/radiant/blob/master/https://www.pexels.com/photo/time-lapse-photo-of-stars-on-night-924824/) # Radiant Radiant is a GRPC proxy service using [Caddy](https://github.com/stellarproject/radiant/blob/master/https://caddyserver.com). Radiant uses a datastore to store server info. By default, there is a simple in-memory datastore. You can implement whatever you want to integrate with external systems. # Building Uses [dep](https://github.com/stellarproject/radiant/blob/master/https://github.com/golang/dep) for dependencies. - `make` To just build binaries: - `make binaries` # Usage To start the server, run: ``` $> radiant ``` Or via code: ```go // create config cfg := &radiant.Config{ GRPCAddr: "unix:///run/radiant.sock", HTTPPort: 80, HTTPSPort: 443, Debug: true, } // instantiate a datastore memDs := memory.NewMemory() // create the server srv, _ := server.NewServer(cfg, memDs) // run the server _ = srv.Run() ``` This will start both the proxy and GRPC servers. There is a Go client available to assist in usage: ```go client, _ := radiant.NewClient("unix:///run/radiant.sock") timeout := time.Second * 30 upstreams := []string{ "http://1.2.3.4", "http://5.6.7.8", } opts := []radiant.AddOpts{ radiant.WithUpstreams(upstreams...), radiant.WithTimeouts(timeout), radiant.WithTLS, } // add the server _ = client.AddServer(host, opts...) // reload the proxy to take effect _ = client.Reload() // remove the server _ = client.RemoveServer(host) // reload to take effect _ = client.Reload() ``` It is safe to reload as often as you wish. There is zero downtime for the reload operation. There is also a CLI that can be used directly or as reference.

近期下载者

相关文件


收藏者