-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
38502bf
commit a5263dd
Showing
11 changed files
with
1,558 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package cmd | ||
|
||
import ( | ||
"dubbo-demo/pkg/dto" | ||
"dubbo-demo/pkg/service" | ||
"dubbo.apache.org/dubbo-go/v3/config" | ||
_ "dubbo.apache.org/dubbo-go/v3/imports" | ||
|
||
hessian "github.com/apache/dubbo-go-hessian2" | ||
) | ||
|
||
func StartDubboServer(){ | ||
config.SetProviderService(&service.UserService{}) | ||
hessian.RegisterPOJO(&dto.UserRequest{}) | ||
hessian.RegisterPOJO(&dto.UserResponse{}) | ||
|
||
err := config.Load(config.WithPath("./conf/dubbo.yml")) | ||
if err != nil{ | ||
panic(err) | ||
} | ||
select { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# dubbo server yaml configure file | ||
|
||
dubbo: | ||
application: | ||
name: dubbogo-demo | ||
module: dubbogo | ||
version: 1.0.0 | ||
owner: demo | ||
registries: | ||
demoZK: | ||
protocol: zookeeper | ||
timeout: 3s | ||
address: 192.168.96.129:2181 | ||
protocols: | ||
dubbo: | ||
name: dubbo | ||
port: 20000 | ||
provider: | ||
register: true | ||
registryIDs: | ||
- demoZK | ||
services: | ||
UserService: | ||
protocol: dubbo | ||
interface: com.demo.exp.service.UserService | ||
group: dubbo-service | ||
version: 1.0.0 | ||
loadbalance: random | ||
warmup: 100 | ||
cluster: failover | ||
methods: | ||
- name: QueryUser | ||
retries: 1 | ||
loadbalance: random | ||
logger: | ||
zap-config: | ||
level: info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
module dubbo-demo | ||
|
||
go 1.17 | ||
|
||
require ( | ||
dubbo.apache.org/dubbo-go/v3 v3.0.0-rc2.0.20211017043158-0aac960e6219 | ||
github.com/apache/dubbo-go-hessian2 v1.9.3 | ||
github.com/pkg/errors v0.9.1 | ||
) | ||
|
||
require ( | ||
github.com/RoaringBitmap/roaring v0.7.1 // indirect | ||
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect | ||
github.com/Workiva/go-datastructures v1.0.52 // indirect | ||
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 // indirect | ||
github.com/alibaba/sentinel-golang v1.0.2 // indirect | ||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.18 // indirect | ||
github.com/apache/dubbo-getty v1.4.5 // indirect | ||
github.com/beorn7/perks v1.0.1 // indirect | ||
github.com/bits-and-blooms/bitset v1.2.0 // indirect | ||
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23 // indirect | ||
github.com/cespare/xxhash/v2 v2.1.1 // indirect | ||
github.com/coreos/go-semver v0.3.0 // indirect | ||
github.com/coreos/go-systemd/v22 v22.3.2 // indirect | ||
github.com/creasty/defaults v1.5.2 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/dubbogo/go-zookeeper v1.0.3 // indirect | ||
github.com/dubbogo/gost v1.11.18 // indirect | ||
github.com/dubbogo/net v0.0.4 // indirect | ||
github.com/dubbogo/triple v1.0.7 // indirect | ||
github.com/emicklei/go-restful/v3 v3.7.1 // indirect | ||
github.com/fsnotify/fsnotify v1.5.1 // indirect | ||
github.com/ghodss/yaml v1.0.0 // indirect | ||
github.com/go-co-op/gocron v1.9.0 // indirect | ||
github.com/go-errors/errors v1.0.1 // indirect | ||
github.com/go-ole/go-ole v1.2.4 // indirect | ||
github.com/go-playground/locales v0.14.0 // indirect | ||
github.com/go-playground/universal-translator v0.18.0 // indirect | ||
github.com/go-playground/validator/v10 v10.9.0 // indirect | ||
github.com/go-resty/resty/v2 v2.3.0 // indirect | ||
github.com/gogo/protobuf v1.3.2 // indirect | ||
github.com/golang/mock v1.4.4 // indirect | ||
github.com/golang/protobuf v1.5.2 // indirect | ||
github.com/golang/snappy v0.0.1 // indirect | ||
github.com/google/gofuzz v1.0.0 // indirect | ||
github.com/google/uuid v1.1.2 // indirect | ||
github.com/gorilla/websocket v1.4.2 // indirect | ||
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect | ||
github.com/hashicorp/errwrap v1.0.0 // indirect | ||
github.com/hashicorp/hcl v1.0.0 // indirect | ||
github.com/hashicorp/vault/sdk v0.2.1 // indirect | ||
github.com/jinzhu/copier v0.3.2 // indirect | ||
github.com/jmespath/go-jmespath v0.3.0 // indirect | ||
github.com/json-iterator/go v1.1.11 // indirect | ||
github.com/k0kubun/pp v3.0.1+incompatible // indirect | ||
github.com/knadh/koanf v1.2.4 // indirect | ||
github.com/leodido/go-urn v1.2.1 // indirect | ||
github.com/lestrrat/go-file-rotatelogs v0.0.0-20180223000712-d3151e2a480f // indirect | ||
github.com/lestrrat/go-strftime v0.0.0-20180220042222-ba3bf9c1d042 // indirect | ||
github.com/magiconair/properties v1.8.5 // indirect | ||
github.com/mattn/go-colorable v0.1.7 // indirect | ||
github.com/mattn/go-isatty v0.0.12 // indirect | ||
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect | ||
github.com/mitchellh/copystructure v1.2.0 // indirect | ||
github.com/mitchellh/mapstructure v1.4.2 // indirect | ||
github.com/mitchellh/reflectwalk v1.0.2 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.1 // indirect | ||
github.com/mschoch/smat v0.2.0 // indirect | ||
github.com/nacos-group/nacos-sdk-go v1.0.9 // indirect | ||
github.com/natefinch/lumberjack v2.0.0+incompatible // indirect | ||
github.com/opentracing/opentracing-go v1.2.0 // indirect | ||
github.com/pelletier/go-toml v1.7.0 // indirect | ||
github.com/pierrec/lz4 v2.5.2+incompatible // indirect | ||
github.com/prometheus/client_golang v1.11.0 // indirect | ||
github.com/prometheus/client_model v0.2.0 // indirect | ||
github.com/prometheus/common v0.28.0 // indirect | ||
github.com/prometheus/procfs v0.6.0 // indirect | ||
github.com/robfig/cron/v3 v3.0.1 // indirect | ||
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect | ||
github.com/shirou/gopsutil v3.20.11+incompatible // indirect | ||
github.com/spf13/afero v1.2.2 // indirect | ||
github.com/spf13/cast v1.3.0 // indirect | ||
github.com/spf13/jwalterweatherman v1.0.0 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
github.com/spf13/viper v1.7.1 // indirect | ||
github.com/subosito/gotenv v1.2.0 // indirect | ||
github.com/toolkits/concurrent v0.0.0-20150624120057-a4371d70e3e3 // indirect | ||
github.com/ugorji/go/codec v1.2.6 // indirect | ||
github.com/zouyx/agollo/v3 v3.4.5 // indirect | ||
go.etcd.io/etcd/api/v3 v3.5.0 // indirect | ||
go.etcd.io/etcd/client/pkg/v3 v3.5.0 // indirect | ||
go.etcd.io/etcd/client/v3 v3.5.0 // indirect | ||
go.uber.org/atomic v1.7.0 // indirect | ||
go.uber.org/multierr v1.6.0 // indirect | ||
go.uber.org/zap v1.19.1 // indirect | ||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 // indirect | ||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5 // indirect | ||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect | ||
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069 // indirect | ||
golang.org/x/text v0.3.6 // indirect | ||
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect | ||
google.golang.org/grpc v1.41.0 // indirect | ||
google.golang.org/protobuf v1.27.1 // indirect | ||
gopkg.in/inf.v0 v0.9.1 // indirect | ||
gopkg.in/ini.v1 v1.51.0 // indirect | ||
gopkg.in/yaml.v2 v2.4.0 // indirect | ||
k8s.io/apimachinery v0.16.9 // indirect | ||
k8s.io/klog v1.0.0 // indirect | ||
) |
Oops, something went wrong.