Go Implementation For Apache Dubbo .
Go to file
2024-10-14 14:24:10 +08:00
.github bump: upgrade actions (#2736) 2024-09-28 20:16:23 +08:00
client Add protobuf based MetadataService support (#2723) 2024-08-08 12:49:12 +08:00
cluster Add protobuf based MetadataService support (#2723) 2024-08-08 12:49:12 +08:00
common Unify timeout unit to millisecond in dubbo protocol (#2737) 2024-10-14 14:24:10 +08:00
config Add protobuf based MetadataService support (#2723) 2024-08-08 12:49:12 +08:00
config_center Compatibility/java interop (#2687) 2024-07-06 15:14:45 +08:00
doc Update README.md (#2677) 2024-05-16 16:51:34 +08:00
filter Compatibility/java interop (#2687) 2024-07-06 15:14:45 +08:00
global Add protobuf based MetadataService support (#2723) 2024-08-08 12:49:12 +08:00
graceful_shutdown feat: update API for unification (#2453) 2023-10-18 14:55:53 +08:00
imports feat : add script routing functionality (#2669) 2024-05-18 15:55:18 +08:00
internal feat:Solving Circular Dependency in Dubbo-Go (#2576) 2024-01-14 15:32:47 +08:00
logger fix: slice is not used...causing format bug. (#2639) 2024-03-16 14:11:59 +08:00
metadata Add protobuf based MetadataService support (#2723) 2024-08-08 12:49:12 +08:00
metrics fix Prometheus Pushgateway can not enable (#2594) 2024-02-23 13:22:02 +08:00
otel/trace Fix:Initialize the correct otel-grpc exporter (#2666) 2024-04-23 13:47:43 +08:00
protocol Unify timeout unit to millisecond in dubbo protocol (#2737) 2024-10-14 14:24:10 +08:00
proxy fix: fix slice init length (#2734) 2024-09-28 18:03:04 +08:00
registry Add protobuf based MetadataService support (#2723) 2024-08-08 12:49:12 +08:00
remoting bug fixes and updates in ut (#2698) 2024-07-10 14:55:28 +08:00
server Add protobuf based MetadataService support (#2723) 2024-08-08 12:49:12 +08:00
tools bug fix: correct the protoc-gen-go-triple path and change protoc-gen-go-triple version to latest (#2690) 2024-06-18 10:34:21 +08:00
xds Compatibility/java interop (#2687) 2024-07-06 15:14:45 +08:00
.asf.yaml Merge branch '3.0' into 3.1 2023-02-24 16:31:12 +08:00
.gitignore ignore goenv 2022-08-12 15:13:14 +08:00
.gitmodules update submodule config 2021-03-27 23:44:12 +08:00
.golangci.yml fix ctx linter error 2021-01-04 16:59:25 +08:00
CHANGELOG.md docs: Update CHANGELOG for release v3.1.0 (#2360) 2023-07-17 12:51:05 +08:00
compat.go Add protobuf based MetadataService support (#2723) 2024-08-08 12:49:12 +08:00
CONTRIBUTING.md docs: Update contributing and issue template (#2289) 2023-04-07 16:39:21 +08:00
doc.go Reallocate protoc plugin and polish package documentations (#2507) 2023-11-18 14:26:19 +08:00
dubbo_test.go feat: deep copy the configuration when instanceOptions flow to ServerOptions/ClientOptions (#2596) 2024-02-29 10:26:10 +08:00
dubbo.go Fix:Resolve service disconnection and configuration invalidations (#2717) 2024-07-26 17:30:35 +08:00
go.mod Run mod tidy 2024-07-06 15:34:35 +08:00
go.sum Run mod tidy 2024-07-06 15:34:35 +08:00
integrate_test.sh ci: Fix CI testing failure on push (#2470) 2023-10-28 19:06:57 +08:00
LICENSE update LICENSE (#2511) 2023-11-21 10:25:08 +08:00
loader.go Compatibility/java interop (#2687) 2024-07-06 15:14:45 +08:00
Makefile Add protobuf based MetadataService support (#2723) 2024-08-08 12:49:12 +08:00
NOTICE Update NOTICE to 2024 2024-01-02 18:51:16 +08:00
options.go Add protobuf based MetadataService support (#2723) 2024-08-08 12:49:12 +08:00
README.md Update README.md 2024-05-16 18:20:36 +08:00

Apache Dubbo for Golang

Build Status codecov go.dev reference Go Report Card license


Apache Dubbo is an easy-to-use Web and RPC framework that provides multiple language implementations(Go, Java, Rust, Node.js, Web) for communication, service discovery, traffic management, observability, security, tools, and best practices for building enterprise-ready microservices.

Dubbo-go is the Go implementation of triple protocol(a fully gRPC compatible and HTTP-friendly protocol) and the various features for building microservice architecture designed by Dubbo.

Visit the official website for more information.

Getting started

You can learn how to develop a dubbo-go RPC application step by step in 5 minutes by following our Quick Start demo.

It's as simple as the code shown below, you define a service with Protobuf, provide your own service implementation, register it to a server, and start the server.

func (srv *GreetTripleServer) Greet(ctx context.Context, req *greet.GreetRequest) (*greet.GreetResponse, error) {
	resp := &greet.GreetResponse{Greeting: req.Name}
	return resp, nil
}

func main() {
	srv, _ := server.NewServer(
		server.WithServerProtocol(
			protocol.WithPort(20000),
			protocol.WithTriple(),
		),
	)

	_ := greet.RegisterGreetServiceHandler(srv, &GreetTripleServer{})

	if err := srv.Serve(); err != nil {
		logger.Error(err)
	}
}

After the server is up and running, call your service via cURL:

curl \
    --header "Content-Type: application/json" \
    --data '{"name": "Dubbo"}' \
    http://localhost:20000/greet.GreetService/Greet

Or, you can start a standard dubbo-go client to call the service:

func main() {
	cli, _ := client.NewClient(
		client.WithClientURL("127.0.0.1:20000"),
	)

	svc, _ := greet.NewGreetService(cli)

	resp, _ := svc.Greet(context.Background(), &greet.GreetRequest{Name: "hello world"})
	
	logger.Infof("Greet response: %s", resp.Greeting)
}

See the samples for detailed information on usage. Next, learn how to deploy, monitor and manage the traffic of your dubbo-go application by visiting the official website.

Features

dubbo-go-architecture

  • RPC Protocols: Triple, gRPC compatible and HTTP-friendly
  • Service Discovery: Nacos, Zookeeper, Etcd, Polaris-mesh, Consul.
  • Load Balance: Adaptive, Random, RoundRobin, LeastActive, ConsistentHash
  • Traffic Management: traffic split, timeout, rate limiting, canary release
  • Configuration: yaml file, dynamic configuration(Nacos, Zookeeper, etc.).
  • Observability: metrics(Prometheus, Grafana) and tracing(Jaeger, Zipkin).
  • HA Strategy: Failover, Failfast, Failsafe/Failback, Available, Broadcast, Forking

Ecosystem

Contributing

Please visit CONTRIBUTING for details on submitting patches and the contribution workflow.

Contact

User List

If you are using apache/dubbo-go and think that it helps you or want to contribute code for Dubbo-go, please add your company to the user list to let us know your needs.

See more user cases

License

Apache Dubbo-go software is licensed under the Apache License Version 2.0. See the LICENSE file for details.