Jupiter是douyu开源的面向服务治理的Golang微服务框架

网友投稿 821 2022-11-01

Jupiter是douyu开源的面向服务治理的Golang微服务框架

Jupiter是douyu开源的面向服务治理的Golang微服务框架

JUPITER: Governance-oriented Microservice Framework

Introduction

JUPITER is a governance-oriented microservice framework, and used for many years in Douyu.

Documentation

See the 中文文档 for document in Chinese.

Quick Start

func main() { var app jupiter.Application app.Startup() app.Serve(startHTTPServer()) app.Serve(startGRPCServer()) app.Schedule(startWorker()) app.Run()}func startHTTPServer() server.Server { server := xecho.DefaultConfig().Build() server.GET("/hello", func(ctx echo.Context) error { return ctx.JSON(200, "Gopher Wuhan") }) return server}func startGRPCServer() server.Server { server := xgrpc.DefaultConfig().Build() helloworld.RegisterGreeterServer(server.Server, new(greeter.Greeter)) return server}func startWorker() worker.Worker { cron := xcron.DefaultConfig().Build() cron.Schedule(xcron.Every(time.Second*10), xcron.FuncJob(func() error { fmt.Println("now: ", time.Now().Local().String()) return nil })) return cron}

More Example:

Quick StartExamples

Bugs and Feedback

For bug report, questions and discussions please submit GitHub Issues.

Contributing

Contributions are always welcomed! Please see CONTRIBUTING for detailed guidelines.

You can start with the issues labeled with good first issue.

Contact

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:SpringMvc-Validated/Valid/ConstraintValidator
下一篇:Spring为何需要三级缓存解决循环依赖详解
相关文章

 发表评论

暂时没有评论,来抢沙发吧~