notify event on remote config changed

This commit is contained in:
yoyofx
2021-07-29 19:30:03 +08:00
parent a67dc7b1ca
commit 887c8e78ea
4 changed files with 73 additions and 22 deletions

28
nacosprovider.go Normal file
View File

@@ -0,0 +1,28 @@
package nacos_viper_remote
type nacosRemoteProvider struct {
provider string
endpoint string
path string
secretKeyring string
}
func DefaultRemoteProvider() *nacosRemoteProvider {
return &nacosRemoteProvider{provider: "nacos", endpoint: "localhost", path: "", secretKeyring: ""}
}
func (rp nacosRemoteProvider) Provider() string {
return rp.provider
}
func (rp nacosRemoteProvider) Endpoint() string {
return rp.endpoint
}
func (rp nacosRemoteProvider) Path() string {
return rp.path
}
func (rp nacosRemoteProvider) SecretKeyring() string {
return rp.secretKeyring
}