区分社区版和商业版

This commit is contained in:
GoEdgeLab
2021-07-25 15:46:12 +08:00
parent 959fbcb2b9
commit 1a6f1b5bec
5 changed files with 13 additions and 8 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*_plus.go

3
go.mod
View File

@@ -4,12 +4,9 @@ go 1.15
replace github.com/TeaOSLab/EdgeCommon => ../EdgeCommon replace github.com/TeaOSLab/EdgeCommon => ../EdgeCommon
replace github.com/TeaOSLab/EdgePlus => ../EdgePlus
require ( require (
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/TeaOSLab/EdgeCommon v0.0.0-00010101000000-000000000000 github.com/TeaOSLab/EdgeCommon v0.0.0-00010101000000-000000000000
github.com/TeaOSLab/EdgePlus v0.0.0-00010101000000-000000000000
github.com/aliyun/alibaba-cloud-sdk-go v1.61.641 github.com/aliyun/alibaba-cloud-sdk-go v1.61.641
github.com/cespare/xxhash/v2 v2.1.1 github.com/cespare/xxhash/v2 v2.1.1
github.com/go-acme/lego/v4 v4.1.2 github.com/go-acme/lego/v4 v4.1.2

View File

@@ -393,11 +393,6 @@ func (this *APINode) registerServices(server *grpc.Server) {
pb.RegisterMonitorNodeServiceServer(server, instance) pb.RegisterMonitorNodeServiceServer(server, instance)
this.rest(instance) this.rest(instance)
} }
{
instance := this.serviceInstance(&services.AuthorityKeyService{}).(*services.AuthorityKeyService)
pb.RegisterAuthorityKeyServiceServer(server, instance)
this.rest(instance)
}
{ {
instance := this.serviceInstance(&services.AuthorityNodeService{}).(*services.AuthorityNodeService) instance := this.serviceInstance(&services.AuthorityNodeService{}).(*services.AuthorityNodeService)
pb.RegisterAuthorityNodeServiceServer(server, instance) pb.RegisterAuthorityNodeServiceServer(server, instance)
@@ -501,6 +496,8 @@ func (this *APINode) registerServices(server *grpc.Server) {
this.rest(instance) this.rest(instance)
} }
APINodeServicesRegister(this, server)
// TODO check service names // TODO check service names
for serviceName := range server.GetServiceInfo() { for serviceName := range server.GetServiceInfo() {
index := strings.LastIndex(serviceName, ".") index := strings.LastIndex(serviceName, ".")

View File

@@ -0,0 +1,9 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// +build community
package nodes
import "google.golang.org/grpc"
func APINodeServicesRegister(node *APINode, server *grpc.Server) {
}

View File

@@ -1,4 +1,5 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved. // Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// +build plus
package services package services