Skip to content
forked from douyu/jupiter

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

License

Notifications You must be signed in to change notification settings

dungwinve/jupiter

This branch is 556 commits behind douyu/jupiter:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f38db3d · Jun 9, 2022
May 29, 2020
Jun 9, 2022
May 27, 2022
Jul 16, 2021
Jun 9, 2022
Mar 23, 2022
Feb 17, 2022
May 29, 2020
Sep 1, 2021
Feb 17, 2022
Aug 27, 2021
Jun 12, 2020
May 29, 2020
May 29, 2020
Feb 17, 2022
May 20, 2022
Jun 8, 2022
Jun 8, 2022
Jan 28, 2022
Mar 17, 2022

Repository files navigation

GoTest codecov go.dev reference Go Report Card license

JUPITER: Governance-oriented Microservice Framework

Introduction

JUPITER is a governance-oriented microservice framework, which is being used for years at Douyu.

Documentation

See the 中文文档 for the Chinese documentation.

Quick Start

func main() {
	var app jupiter.Application
	app.Startup()
	app.Serve(startHTTPServer())
	app.Serve(startGRPCServer())
	app.Schedule(startWorker())
//	app.Executor(startXxlJob())
	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 {
		return nil
	}))
	return cron
}
// 注册xxl定时任务
/*
func startXxlJob() executor.Executor {
	executor := xxl.DefaultConfig().Build()
	executor.RegXJob(
		NewTest(),
	)
	return executor
}
*/

More Example:

Bugs and Feedback

For bug report, questions and discussions please submit an issue.

Contributing

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

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

Contact

About

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

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.7%
  • Other 1.3%