diff --git a/contrib/config/apollo/apollo.go b/contrib/config/apollo/apollo.go index 421606bd1..8df7465b2 100644 --- a/contrib/config/apollo/apollo.go +++ b/contrib/config/apollo/apollo.go @@ -11,6 +11,7 @@ type apollo struct { client *agollo.Client } +// Option is apollo option type Option func(*options) type options struct { @@ -20,7 +21,7 @@ type options struct { endpoint string namespace string isBackupConfig bool - backupPath string + backupPath string } // WithAppID with apollo config app id @@ -72,7 +73,6 @@ func WithNamespace(name string) Option { } } - // WithBackupPath with apollo config backupPath func WithBackupPath(backupPath string) Option { return func(o *options) { @@ -87,12 +87,12 @@ func NewSource(opts ...Option) config.Source { } client, err := agollo.StartWithConfig(func() (*apolloConfig.AppConfig, error) { return &apolloConfig.AppConfig{ - AppID: op.appid, - Cluster: op.cluster, - NamespaceName: op.namespace, - IP: op.endpoint, - IsBackupConfig: op.isBackupConfig, - Secret: op.secret, + AppID: op.appid, + Cluster: op.cluster, + NamespaceName: op.namespace, + IP: op.endpoint, + IsBackupConfig: op.isBackupConfig, + Secret: op.secret, BackupConfigPath: op.backupPath, }, nil }) diff --git a/version.go b/version.go index 0f7638cd6..b8a598990 100644 --- a/version.go +++ b/version.go @@ -1,4 +1,4 @@ package kratos // Release is the current kratos version. -const Release = "v2.0.5" +const Release = "v2.1.0"