-
Notifications
You must be signed in to change notification settings - Fork 929
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1161 from Patrick0308/feature/3.0-service-discovery
Imp: remote service discovery
- Loading branch information
Showing
84 changed files
with
2,257 additions
and
1,960 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
notifications: | ||
commits: commits@dubbo.apache.org | ||
issues: notifications@dubbo.apache.org | ||
pullrequests: notifications@dubbo.apache.org | ||
jira_options: link label link label | ||
notifications: | ||
commits: commits@dubbo.apache.org | ||
issues: notifications@dubbo.apache.org | ||
pullrequests: notifications@dubbo.apache.org | ||
jira_options: link label link label |
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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
--- | ||
name: Bug Report | ||
about: Report a bug | ||
labels: kind/bug | ||
|
||
--- | ||
|
||
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks! | ||
--> | ||
|
||
|
||
**What happened**: | ||
|
||
**What you expected to happen**: | ||
|
||
**How to reproduce it (as minimally and precisely as possible)**: | ||
|
||
**Anything else we need to know?**: | ||
--- | ||
name: Bug Report | ||
about: Report a bug | ||
labels: kind/bug | ||
|
||
--- | ||
|
||
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks! | ||
--> | ||
|
||
|
||
**What happened**: | ||
|
||
**What you expected to happen**: | ||
|
||
**How to reproduce it (as minimally and precisely as possible)**: | ||
|
||
**Anything else we need to know?**: |
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
--- | ||
name: Enhancement Request | ||
about: Suggest an enhancement | ||
labels: kind/feature | ||
|
||
--- | ||
<!-- Please only use this template for submitting enhancement requests --> | ||
|
||
**What would you like to be added**: | ||
|
||
--- | ||
name: Enhancement Request | ||
about: Suggest an enhancement | ||
labels: kind/feature | ||
|
||
--- | ||
<!-- Please only use this template for submitting enhancement requests --> | ||
|
||
**What would you like to be added**: | ||
|
||
**Why is this needed**: |
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
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,33 @@ | ||
package extension | ||
|
||
import ( | ||
"fmt" | ||
) | ||
|
||
import ( | ||
perrors "github.com/pkg/errors" | ||
) | ||
|
||
import ( | ||
"github.com/apache/dubbo-go/metadata/service/remote" | ||
) | ||
|
||
type remoteMetadataServiceCreator func() (remote.RemoteMetadataService, error) | ||
|
||
var ( | ||
creator remoteMetadataServiceCreator | ||
) | ||
|
||
// SetRemoteMetadataService will store the remote metadata service | ||
func SetRemoteMetadataService(creatorFunc remoteMetadataServiceCreator) { | ||
creator = creatorFunc | ||
} | ||
|
||
// GetRemoteMetadataServiceFactory will create a MetadataService instance | ||
func GetRemoteMetadataService() (remote.RemoteMetadataService, error) { | ||
if creator != nil { | ||
return creator() | ||
} | ||
return nil, perrors.New(fmt.Sprintf("could not find the metadata service creator for metadataType: remote, please check whether you have imported relative packages, \n" + | ||
"remote - github.com/apache/dubbo-go/metadata/remote/impl")) | ||
} |
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
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
Oops, something went wrong.