mirror of
https://github.com/go-kratos/kratos.git
synced 2025-03-17 21:07:54 +02:00
parent
056812e4b2
commit
d0c65fbd75
@ -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
|
||||
})
|
||||
|
@ -1,4 +1,4 @@
|
||||
package kratos
|
||||
|
||||
// Release is the current kratos version.
|
||||
const Release = "v2.0.5"
|
||||
const Release = "v2.1.0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user